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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mutaharbhatti
Regular Visitor

Dax Row Level Normalization/ Conditional Formatting Help

I want help to create 1 measure which can do both work so I can put it on the table and be able to drill up and drill down 

 

Hi, 

I have 2 Dax Measures which normalize the data between 0 to 1 so I can use them to create row-based conditional formatting.

 

1st Measure normalizes the data for only  Year and 2nd one normalizes data for only Quarters

 

I am attaching a .pbix file you can go through it to see my dax measures 

 

Thanks

 

 

Power Bi File 

https://www.dropbox.com/s/6lca1mcelm301tu/Power%20Bi%20Help.pbix?dl=0

 

mutaharbhatti_0-1680012986012.png

 

DAX Measure Used for Normalizing Quaterly  just Removed Quater from summary table and from allselected() to create yearly

 

Value Graient =
VAR summarytable = 
CALCULATETABLE(
ADDCOLUMNS
SUMMARIZE(Vol,
Vol[Product],Vol[Year],Vol[Quater]
),"values",[Values]),
ALLSELECTED(Vol[Year],Vol[quater])
)


Var MaxValue =
MAXX(summarytable,[values])


Var MinValue =
MINX(summarytable,[values])

VAR Range = MaxValue - MinValue

Var Hue =
ROUND(
DIVIDE([Values] - MinValue,
Range),2)

Return
Hue
0 REPLIES 0

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors