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

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