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
swathrddy
Helper I
Helper I

Calculated Measure

KPI No 
ValueDate
2.1.1 ActualYes Jun-24
2.1.1 TargetYesJun-24
write a calculated measure to return TEXT from Column value for KPI no = 2.1.1 Actual and date = Jun-24
 

Wrote this, but is giving only if the Value ie "YES"

CALCULATE(
    MIN('Data File for PB'[Value]),
    'Data File for PB'[KPI No] IN { "2.1.1 Actual" },
    'Data File for PB'[Date] >= "1/06/2024"
)

 

I would like to return the exact text for the condition. 

Appreciate your help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @swathrddy ,

Based on the information you provided, it looks like the data type of this column is date:

vjunyantmsft_0-1722227949172.png

But you used this in DAX:

>= "1/06/2024"

This is equivalent to comparing dates and text, which is incorrect. Please modify it to the following DAX:

Measure = 
CALCULATE(
    MIN('Data File for PB'[Value]),
    'Data File for PB'[KPI No] IN { "2.1.1 Actual" },
    'Data File for PB'[Date] >= DATE(2024, 6, 1)
)

vjunyantmsft_1-1722228054535.png

 


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @swathrddy ,

Based on the information you provided, it looks like the data type of this column is date:

vjunyantmsft_0-1722227949172.png

But you used this in DAX:

>= "1/06/2024"

This is equivalent to comparing dates and text, which is incorrect. Please modify it to the following DAX:

Measure = 
CALCULATE(
    MIN('Data File for PB'[Value]),
    'Data File for PB'[KPI No] IN { "2.1.1 Actual" },
    'Data File for PB'[Date] >= DATE(2024, 6, 1)
)

vjunyantmsft_1-1722228054535.png

 


Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

swathrddy
Helper I
Helper I

Not returning any value 😞

swathrddy_0-1721889770176.pngI have the following target types, in one single table.

Trying to add headline numbers for current month "Yes". Calculated measure should pull the text YES / NO for current month from Values column.

 

bhanu_gautam
Super User
Super User

@swathrddy , Try using below DAX

DAX
Measure =
CALCULATE(
SELECTEDVALUE('Data File for PB'[Value]),
'Data File for PB'[KPI No] = "2.1.1 Actual",
'Data File for PB'[Date] = "Jun-24"
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






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.

Top Solution Authors