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
Anonymous
Not applicable

Dax Warning measure

Hi all,

I have a dax query which looks like this 

Expiry warning = var __diff = DATEDIFF(MAX(Pipeline[Delivery Date] ) , MAX(Pipeline[Approval Expiry Date]),MONTH ) return IF( HASONEVALUE(Pipeline[Delivery Date] ), IF( __diff <= 3 , " 🔴 " & __diff & " months" ,"🟢 " & __diff & " months" ) )
however id like to create something like this for a completely different factor.

I have 3 types of spreads -
original - current - difference 


i would like the dax query to highlight in a separate column in the table when spread current falls under 2.00

Would this be possible?

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, you want a separate column to highlight when the Current column falls under 2, here's my solution.

1.Create a blank column.

Column = BLANK()

vkalyjmsft_0-1648540258139.png

2.In the Visuallizations pane, select the new column, turn on the Background color.

vkalyjmsft_1-1648540982499.png

Set it like this:

vkalyjmsft_2-1648541798243.png

Get the result.

vkalyjmsft_3-1648542321271.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, you want a separate column to highlight when the Current column falls under 2, here's my solution.

1.Create a blank column.

Column = BLANK()

vkalyjmsft_0-1648540258139.png

2.In the Visuallizations pane, select the new column, turn on the Background color.

vkalyjmsft_1-1648540982499.png

Set it like this:

vkalyjmsft_2-1648541798243.png

Get the result.

vkalyjmsft_3-1648542321271.png

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

Anonymous
Not applicable

@amitchandak 

Hi I was wondering if this was something you could help me with please?

Anonymous
Not applicable

forgot to add would this require conditional formattign or a dax measure

@Anonymous , I doubt I completely got it. But seem like it require two measures one return color and another unichar

 

example

 

/////Arrow
Arrow =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, UNICHAR(9650),
_change = 0, UNICHAR(9654),
_change < 0, UNICHAR(9660)
)


/////Arrow Color
Arrow color =
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
TRUE(),
_change > 0, "green",
_change = 0, "blue",
_change < 0, "red"
)

 

https://exceleratorbi.com.au/conditional-formatting-using-icons-in-power-bi/
https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692

 

 

I need little bit more details to help

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

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.