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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
andyly85
Frequent Visitor

If statement in DAX-how to implement for measures %, and the output as a quarter end date.

Hi team, I am trying to implement a new measure which outputs the quarter end date if a measure is >25%, else blank  So far I have coded in DAX:  But having no success so far...

 

>25% = IF('Rank'[Largest Client %] > 25%, "December 22")
1 ACCEPTED SOLUTION
v-binbinyu-msft
Community Support
Community Support

Hi @andyly85 ,

You just need do a simple modification, change 25% to 0.25, please try below dax formula:

>25% = IF([Column1]>0.25,"December22")

vbinbinyumsft_0-1674625578359.png

Best regards,
Community Support Team_Binbin Yu
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

4 REPLIES 4
v-binbinyu-msft
Community Support
Community Support

Hi @andyly85 ,

You just need do a simple modification, change 25% to 0.25, please try below dax formula:

>25% = IF([Column1]>0.25,"December22")

vbinbinyumsft_0-1674625578359.png

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

This works now, thanks!

amitchandak
Super User
Super User

@andyly85 , Assume you need qtr for today of selected date

 

Qtr =
var _today = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _max = eomonth(_today, if( mod(Month(_today),3) =0,0,3-mod(Month(_today),3)))

return

IF('Rank'[Largest Client %] > 25%, _max )

Hi!  This has come up as an error..

 

The following syntax error occurred during parsing: Invalid token, Line 7, Offset 33, %.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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