Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Heonsang
Frequent Visitor

Find out first date workable in slicer

Hello,

 

I'm trying to calculate premier and repeat value from the data table. Last time I could create Premier data by adding the measure CALCULATE(MIN(Data[Transmitted Date]), VALUES(Data[Program])) but this isn't useless at this scenario. If I add Transmitted Date in Result Table then this measure doesn't work. 

 

I have created the source and result I expect.

 

- Data Table

 

Program | Duration | Transmitted Date (d/m/y)

Avengers | 0:22:00 | 5/2/2018

Avengers | 0:22:00 | 2/3/2018

Avengers | 0:22:00 | 25/3/2018

Avengers | 0:22:00 | 26/3/2018

Avengers | 0:22:00 | 5/4/2018

Black Panther | 0:25:00 | 2/3/2018

Black Panther | 0:25:00 | 6/3/2018

Captain Marvel | 0:32:00 |7/2/2018

Captain Marvel | 0:32:00 |25/2/2018

 

 

- Report

Slicer : Tramsmitted Date is between 1/3/2018 and 31/3/2019

 

Result table

Program | Duration | Transmitted Date (d/m/y) | Premier or Repeat

Avengers | 0:22:00 | 2/3/2018 | Premier

Avengers | 0:22:00 | 25/3/2018 | Repeat

Avengers | 0:22:00 | 26/3/2018 | Repeat

Black Panther | 0:25:00 | 2/3/2018 | Premier

Black Panther | 0:25:00 | 6/3/2018 | Repeat

 

Premier duration = 0:22:00 + 0:25:00

 

 

 

1 ACCEPTED SOLUTION
LivioLanzo
Solution Sage
Solution Sage

 

Hi @Heonsang

 

I do not if i understood it correctly but that is what I did:

 

created this model

 

 

 

Capture.PNG

 

 

and added this measure:

 

Measure = 
IF(
    HASONEVALUE( Programs[Program] ),
    IF(
        COUNTROWS( Transmissions ) > 0,
        VAR MinDte = 
        CALCULATE(
            MIN( Transmissions[TransmittedDate(d/m/y)] ),
            ALLSELECTED( 'Calendar' )
        )
        RETURN
        IF( MinDte = MIN( 'Calendar'[Date] ), "Premier", "Repeat" ),
    BLANK()
    )
)

Capture.PNG

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Heonsang,

 

Could you please mark the proper answers as solutions?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LivioLanzo
Solution Sage
Solution Sage

 

Hi @Heonsang

 

I do not if i understood it correctly but that is what I did:

 

created this model

 

 

 

Capture.PNG

 

 

and added this measure:

 

Measure = 
IF(
    HASONEVALUE( Programs[Program] ),
    IF(
        COUNTROWS( Transmissions ) > 0,
        VAR MinDte = 
        CALCULATE(
            MIN( Transmissions[TransmittedDate(d/m/y)] ),
            ALLSELECTED( 'Calendar' )
        )
        RETURN
        IF( MinDte = MIN( 'Calendar'[Date] ), "Premier", "Repeat" ),
    BLANK()
    )
)

Capture.PNG

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.