Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Split result of measure on other categories

Hi 

 

I have a challenge for you all that I've been trying to solve for a while. 

 

Merknad 2021-06-28 133814.jpg

 

 

 

 

 

 

 

I have a few categories. I have GGR, and a % distribution of total GGR. Further, I have a direct cost for each category and I have others costs which in this case is  1 380.57. I want to distribute this cost based on the %-distribution of GGR, as shown in the yellow column. When I make a measure to filter out other costs and multiply it with the %-distribution it returns zero for the categories other than other costs, due to the filtering of categories.

 

Is it possible to use the measure value as just a value in the computation of the "other costs"- distribution? I have not managed to solve this and ended up hardcoding the number in the formula, but that does not make it very dynamic. I would like to not use calculated columns if possible since the dataset is large enough as it is. 

 

Thank you in advance! Christer

1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@Anonymous,

 

Try this measure:

 

Other Costs Distribution = 
VAR vOtherCosts =
    CALCULATE ( SUM ( Table1[Direct Cost] ), Table1[Category] = "Other Costs" )
VAR vResult = vOtherCosts * [GGR %]
RETURN
    vResult

 

DataInsights_0-1624888356512.png

 





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

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@Anonymous,

 

Try this measure:

 

Other Costs Distribution = 
VAR vOtherCosts =
    CALCULATE ( SUM ( Table1[Direct Cost] ), Table1[Category] = "Other Costs" )
VAR vResult = vOtherCosts * [GGR %]
RETURN
    vResult

 

DataInsights_0-1624888356512.png

 





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

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors