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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. 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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.