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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How keep the total amount of my initiative no matter number of categories to which it belongs

Hi,

 

I have a question, I'm working with data that refers to the initiatives, each initiative has its buget but each of these initiatives could belongs to a one or more categories, how I can divide these total amount per category respecting the total of each initiative?

 

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

Hi @Anonymous ,

 

Here is my test data.
4-1.PNG4-2.PNG

Then add the Budget column in the Table 2.

Budget =
CALCULATE (
    SELECTEDVALUE ( 'Table'[Budget] ),
    FILTER ( 'Table', 'Table'[Initiative] = 'Table (2)'[Initiative] )
)

Now you could use DIVIDE() function to get the result.

Measure =
VAR a =
    CALCULATE (
        AVERAGE ( 'Table'[Budget] ),
        ALLEXCEPT ( 'Table', 'Table'[Initiative] )
    )
VAR b =
    CALCULATE (
        AVERAGE ( 'Table (2)'[Budget] ),
        ALLEXCEPT ( 'Table (2)', 'Table (2)'[Catagory] )
    )
RETURN
    DIVIDE ( b, a )

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

2 REPLIES 2
v-eachen-msft
Community Support
Community Support

Hi @Anonymous ,

 

Here is my test data.
4-1.PNG4-2.PNG

Then add the Budget column in the Table 2.

Budget =
CALCULATE (
    SELECTEDVALUE ( 'Table'[Budget] ),
    FILTER ( 'Table', 'Table'[Initiative] = 'Table (2)'[Initiative] )
)

Now you could use DIVIDE() function to get the result.

Measure =
VAR a =
    CALCULATE (
        AVERAGE ( 'Table'[Budget] ),
        ALLEXCEPT ( 'Table', 'Table'[Initiative] )
    )
VAR b =
    CALCULATE (
        AVERAGE ( 'Table (2)'[Budget] ),
        ALLEXCEPT ( 'Table (2)', 'Table (2)'[Catagory] )
    )
RETURN
    DIVIDE ( b, a )

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
JarroVGIT
Resident Rockstar
Resident Rockstar

Do you have an example of your dataset and your desired results? I don't fully understand what you are trying to achieve.





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! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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