cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
Anonymous
Not applicable

Need help with Dax formula please

Hello All,

 

I have been trying to create a Bleeders and Leaders (Delta) or Draggers and Drivers metric and it always gets blown up for the metric that has the lowest absolute value.  For example, if Bleeders is -100 and Leaders is 50, I am able to get the desired result for Bleeders metrics but not Leaders.  Below is a screen shot of the issue.  I thought this was a LOD issue, and it still might be but i have rolled sales up into Department level from Item level and im still not able to get this solved.  Any help would be much appreciated.

 

Notice the Total doesnt show up for Leaders because the absolute value is less than the bleeders, therefore having leaders values dividing into a total that is blank or zero and creating the result "infinity"

 

Pic of B&L issue.jpg

 

I can also post the dax formulas if needed.

 

Thank you for your help

3 REPLIES 3
Anonymous
Not applicable

Here are some of the Dax formulas used to create these metrics...

 

Sales = SUM(DailySalesTable[SalesAmt])
PY Sales = CALCULATE([Sales],DATEADD(Dates[Date],-1,YEAR))
YOY Sales = [Sales] - [PY Sales]
Sales Bleeders = IF([YOY Sales]<0,[YOY Sales])
Sales Bleeders % Mix = [Sales Bleeders]/CALCULATE([Sales Bleeders],ALLSELECTED(HierarchyTable))
Sales Leaders = IF([YOY Sales]>0, [YOY Sales])
Sales Leaders % Mix = [Sales Leaders]/CALCULATE([Sales Leaders],ALLSELECTED(HierarchyTable))
 
On the Sales Bleeders/Leaders % Mix, i have also tried ALLSELECTED(HierarchyTable[Department]))  because the DailySalesTable contains Department level all the way down to Item level and i have a feeling this isnt working because of LOD and items having positive and negative sales.
 
Here is the schema... i also wonder if i create a table with the sales data rolled up so its not item levle if that will help.  I would only want to see Bleeders and Leaders at Site, Dept or Cat level...
 
WPCarey1985_0-1611452049500.png

 

 
StefanoGrimaldi
Resident Rockstar
Resident Rockstar

hey, 

yes paste a example dummy data and the current dax used that will help lots in having a good answer and asistence. 





Did I answer your question? Mark my post as a solution! / Did it help? Give some Kudos!

Proud to be a Super User!




Anonymous
Not applicable

Ok let me build some dummy data and i will get back to you.  Thanks,

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors