cancel
Showing results for
Did you mean:

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

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"

I can also post the dax formulas if needed.

3 REPLIES 3
Anonymous
Not applicable

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

Sales = SUM(DailySalesTable[SalesAmt])
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])

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...

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,