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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Niels_T
Post Patron
Post Patron

How to make value in measure constant

I have a measure that calculates forecasted amount.

Forecasted Amount = VAR percentage = Divide(SUM('Credit Memo + Invoice'[Amount]), calculate(SUM('Credit Memo + Invoice'[Amount]), allselected()) ) RETURN
    SUM('Forecast Totals (GS)'[Forecast])* percentage

 

In a table it looks like this:

Niels_T_0-1652345467476.png

 

As you can see on May we have the value 329.08, however, when I add a filter on May I get the total value.

 

Niels_T_1-1652345550287.png

 

How can I make sure that this doesn't change and that it display 329.08 like before the filter?

 

 

 

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

Hi @Niels_T ,

Please update the formula of your measure [Forecasted Amount] as below and check whether it can get the correct result...

Forecasted Amount =
VAR percentage =
    DIVIDE (
        SUM ( 'Credit Memo + Invoice'[Amount] ),
        CALCULATE (
            SUM ( 'Credit Memo + Invoice'[Amount] ),
            ALL ( 'Credit Memo + Invoice' )
        )
    )
RETURN
    SUM ( 'Forecast Totals (GS)'[Forecast] ) * percentage

If the above one can't help you get the desired result, please provide some sample data in the table 'Credit Memo + Invoice' and 'Forecast Totals (GS)(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
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-yiruan-msft
Community Support
Community Support

Hi @Niels_T  ,

Whether your problem has been resolved? If yes, could you please mark the helpful post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yiruan-msft
Community Support
Community Support

Hi @Niels_T ,

Please update the formula of your measure [Forecasted Amount] as below and check whether it can get the correct result...

Forecasted Amount =
VAR percentage =
    DIVIDE (
        SUM ( 'Credit Memo + Invoice'[Amount] ),
        CALCULATE (
            SUM ( 'Credit Memo + Invoice'[Amount] ),
            ALL ( 'Credit Memo + Invoice' )
        )
    )
RETURN
    SUM ( 'Forecast Totals (GS)'[Forecast] ) * percentage

If the above one can't help you get the desired result, please provide some sample data in the table 'Credit Memo + Invoice' and 'Forecast Totals (GS)(exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
Super User
Super User

- use your own Calendar table

- use ISFILTERED to inquire if the month is currently being filtered, and FILTERS  to see what the filter value is.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.