How to Ranking a Value by Ignoring Some Columns in the Calculation?

Measurement to get program Rank for Current Day

Program Item Rank CD =
RANKX(
ALLSELECTED(‘Program Name’[Program Name]),
[Program TVS This Day] + DIVIDE([Alphabetical_Rank], 1000000)

)

Measurement to get program Rank for Previous Day

Program Item Rank PD =
IF(
ISBLANK( [Program TVS Prev Day]),
BLANK(),
RANKX(
ALLSELECTED(‘Program Name’[Program Name]),
[Program TVS Prev Day] + DIVIDE([Alphabetical_Rank], 1000000)
)
)

Measurement to get the rank and kenaikan/penurunannya dibanding hari sebelumnya

Program Ranking Label Daily =
VAR _ItemRankChange =
IF(
ISBLANK([Program Item Rank PD]),
0,
[Program Item Rank CD] - [Program Item Rank PD]
)
VAR _ExtraSpace = REPT(“‏‏‎ ‎”, 5)
VAR _Indicator =
SWITCH(
TRUE,
_ItemRankChange = 0, “#” & [Program Item Rank CD] & _ExtraSpace & “—”,
_ItemRankChange > 0, “#” & [Program Item Rank CD] & _ExtraSpace & “▼” & _ItemRankChange,
_ItemRankChange < 0, “#” & [Program Item Rank CD] & _ExtraSpace & “▲” & ABS( _ItemRankChange )
)
VAR _Label = _Indicator
RETURN
_Label

I want to rank based on TV Share, the output is to create a visual table with Rank, Program Name, TV Share, Start time and End time columns.
I just want to focus on the Program Name and TV Share to make the ranking, when it doesn’t display the Start time and End time in the visualization table, the results are correct. But when displaying the Start time and End time, the Rank is not read correctly (all Ranks are 1), because it seems that the Ranking is trying to find programs with the same Start time and End time as the previous day.

How do I display the Start time and End time still in the table, but ignore them to be able to display the rank?

Thanks in advance