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

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 . 

 

 

Capture1.PNG

 

Expected output: 

 

Capture.PNG

 

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 ?

 

Capture.PNG

 

Thanks

G venkatesh

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

Hi @Anonymous ,

 

Based on your description, the easiest way is that you can move the date column in your table visual.

Result:

030401.gif

 

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:
030402.gif

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.

View solution in original post

7 REPLIES 7
v-yuaj-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on your description, the easiest way is that you can move the date column in your table visual.

Result:

030401.gif

 

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:
030402.gif

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.

jaideepnema
Solution Sage
Solution 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 !! 😀 

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

​​​​​​

FarhanAhmed
Community Champion
Community Champion

Can you please share DAX code for your measures?

 

 







Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!

Proud to be a Super User!




Anonymous
Not 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 
jaideepnema
Solution Sage
Solution Sage

@Anonymousnot very clear but Is total count of Rows a Measure ? (which is basically your denominator in this case )

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

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.