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
united2win
Helper III
Helper III

DAX - Division for Total Careers

Hello

I have the following table that shows a running total and the total amount of each BatchNumber. My question is whether it is possible to create a dynamic measure that can divide the running total by the total in the first table. Would this DAX measure be dynamic in a way that would change when adding a slicer? for example, filtering by country or record types.

Please see below the ppix file:

https://drive.google.com/file/d/1eUoq55NCDNpoptZkvpXWPpPUafSV18iJ/view?usp=sharing

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

Hi @united2win ,

 

Based on your description, you can create a measure as follows.

 

division = FORMAT(DIVIDE('WFRegistrations'[Running Total],'WFRegistrations'[TOTALS]),"0.0000")

calculated_TOTALS = CALCULATE(COUNTA(WFRegistrations[Id]),AllEXCEPT('WFRegistrations',WFRegistrations[BatchNumber],WFRegistrations[Registration Type]))

 

Result:

v-yuaj-msft_0-1606202349068.png

 

 

‘calculated_TOTALS’ refers to the total count of IDs of all countries in the selected ‘Registration Type’.

You can use “ctrl”+click to choose multiple sections.

 

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

3 REPLIES 3
v-yuaj-msft
Community Support
Community Support

Hi @united2win ,

 

Based on your description, you can create a measure as follows.

 

division = FORMAT(DIVIDE('WFRegistrations'[Running Total],'WFRegistrations'[TOTALS]),"0.0000")

calculated_TOTALS = CALCULATE(COUNTA(WFRegistrations[Id]),AllEXCEPT('WFRegistrations',WFRegistrations[BatchNumber],WFRegistrations[Registration Type]))

 

Result:

v-yuaj-msft_0-1606202349068.png

 

 

‘calculated_TOTALS’ refers to the total count of IDs of all countries in the selected ‘Registration Type’.

You can use “ctrl”+click to choose multiple sections.

 

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.

v-yuaj-msft
Community Support
Community Support

Hi @united2win ,

 

It's not very clear. Could you please kindly provide sample data (or sample models) and your desired outcome?

 

Best Regards,
Yuna

Hi, Apologies I've de-sensitized the data. Please find the google drive link. Ideally I would like to apply a country filter. However currently you can see the percentages are too low. Both the numerator and the denominator should take into account the filtered current. Also, can we fill in the blanks for the running total?

https://drive.google.com/file/d/1eUoq55NCDNpoptZkvpXWPpPUafSV18iJ/view?usp=sharing

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