Reply
swathrddy
Helper I
Helper I
Partially syndicated - Outbound

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
v-junyant-msft
Community Support
Community Support

Syndicated - Outbound

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
v-junyant-msft
Community Support
Community Support

Syndicated - Outbound

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

Syndicated - Outbound

@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






avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)