Forum Discussion
Divide function not splitting data as per the expected
Hi Community,
Probably the one i am sharing below might be an easier one . However, i am not sure how to search the existing articles or how to fix this issue. I have columns called SVP,Month year , Forecast 2021 as shown below . (have to hide SVP values a bit because of SPI) . In the image shown below, I am getting Forecast 2021 Nr values properly as expected. I basically have 3 SVP's in org and Numerator values are splitted accordingly. However, I created one more measure to show % of Numerator / Denominator .
Expected output:
Denominator Values and rest of the measures are shown below. My total Numerator value is 391 for all 3 SVPs. Denominator is 28852 . When i created a measure to divde Nr/Dr , i got 1.36 % . So, what i am trying to acheive is 1.36% should split according to SVPs . However ,i am getting 100% against each SVP. I am not sure where i am going wrong . Could some one please assist me on this ?
Thanks
G venkatesh
- Anonymous5 years ago
Hi Anonymous ,
Based on your description, the easiest way is that you can move the date column in your table visual.
Result:
Or you can modify your "Denominator" column as follows so that you don't have to remove the date column.
Denominator = CALCULATE(COUNT ( 'Mainframe Turndown'[PROCESSNAME] ),ALL('Mainframe Turndown'))Result:Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
7 Replies
- jaideepnemaSolution Sage
Anonymousnot very clear but Is total count of Rows a Measure ? (which is basically your denominator in this case )
- AnonymousNot applicable
Hi Farhan and Jaideep,
Thanks for replying. Below are the DAX measures i have created for Numerator, Denominator and Nr/Dr .Numerator - Forecast 2021 Nr = CALCULATE(COUNT('Mainframe Turndown'[PROCESSNAME]),FILTER('Mainframe Turndown','Mainframe Turndown'[Turndown PeriodForecast]="5/1/2021"))Denominator - Total Count of rows = COUNT ( 'Mainframe Turndown'[PROCESSNAME] )Nr/Dr =Forecast 2021 = CALCULATE(DIVIDE([Forecast 2021 Nr],[Total Count of rows],0),ALL('Mainframe Turndown'[PROCESSNAME]))Thanks,G venkatesh
- FarhanAhmedCommunity Champion
Can you please share DAX code for your measures?
- AnonymousNot applicable
Hi Farhan ,
Thanks for replying. Below are the DAX measures i have created for Numerator, Denominator and Nr/Dr .Numerator - Forecast 2021 Nr = CALCULATE(COUNT('Mainframe Turndown'[PROCESSNAME]),FILTER('Mainframe Turndown','Mainframe Turndown'[Turndown PeriodForecast]="5/1/2021"))Denominator - Total Count of rows = COUNT ( 'Mainframe Turndown'[PROCESSNAME] )Nr/Dr =Forecast 2021 = CALCULATE(DIVIDE([Forecast 2021 Nr],[Total Count of rows],0),ALL('Mainframe Turndown'[PROCESSNAME]))Thanks,G venkatesh
- jaideepnemaSolution Sage
Hi Anonymous ,
Try changing the denominator measure to :
Total Count of rows = CALCULATE(COUNT ( 'Mainframe Turndown'[PROCESSNAME] ),ALL('Mainframe Turndown'[PROCESSNAME]))
Hope that helps !! 😀
- AnonymousNot applicable
Hi JaiDeep,
I recreated a DAX measure with the code you have given. It didnt helped to resolve the issue.
Not sure what to do now.
​​​​​​
- AnonymousNot applicable
Hi Anonymous ,
Based on your description, the easiest way is that you can move the date column in your table visual.
Result:
Or you can modify your "Denominator" column as follows so that you don't have to remove the date column.
Denominator = CALCULATE(COUNT ( 'Mainframe Turndown'[PROCESSNAME] ),ALL('Mainframe Turndown'))Result:Hope that's what you were looking for.
Best Regards,
Yuna
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.