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
650AA
Helper I
Helper I

DAX Calculation --I just wish to calculate or return what is in the red box as this is in relation

Hi I am looking for some advice and guidance on how to calculate the total of the numbers in the red box.

650AA_0-1710952507193.png

For some context the Top 15 Forecast refers to the Top 15 programmes by highest value and the below DAX to calculate its –

650AA_1-1710952541585.png

([PivotNewTotalForecast] is a SUM total of all forecast values rows)

 

The New Total Remit is a sum total of all the remit values, however I just wish to calculate or return what is in the red box as this is in relation with the Top 15 programmes rather than the top15 remit values on their own. Is there a way to do this dynamically ?

 

Thank you in advance

 

 @v-jingzhan-msft

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

Hi @650AA ,

 

In my tests, everything shows up fine. It will return the corresponding results according to the normal topn.
Check if the funnel in the top right corner is filtered by other conditions.

top5 = 
VAR top_ =
    TOPN ( 5, ALLSELECTED ( 'Table'[Program] ), [PivotNewTotalForecast] )
RETURN
     CALCULATE ( [PivotNewTotalForecast], KEEPFILTERS ( top_ ) )

vkongfanfmsft_0-1711093808932.png

vkongfanfmsft_1-1711094025645.png

Best Regards,
Adamk Kong

 

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

5 REPLIES 5
v-kongfanf-msft
Community Support
Community Support

Hi @650AA ,

 

In my tests, everything shows up fine. It will return the corresponding results according to the normal topn.
Check if the funnel in the top right corner is filtered by other conditions.

top5 = 
VAR top_ =
    TOPN ( 5, ALLSELECTED ( 'Table'[Program] ), [PivotNewTotalForecast] )
RETURN
     CALCULATE ( [PivotNewTotalForecast], KEEPFILTERS ( top_ ) )

vkongfanfmsft_0-1711093808932.png

vkongfanfmsft_1-1711094025645.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

_AAndrade
Super User
Super User

Hi,

Try this on the RETURN:
Calculate ([PivotNewTotalForecast] ),
FILTER('enhancement finance_report (Pivot)',[programme] IN PProgramsTotals)
)





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Hi this has not worked, it has just retunr the same values in the Top15forecast colum, it is the NewTotal Remit Column i need to calculate and return what is in the red box as this is in relation with the Top 15 programmes rather than the top15 remit values on their own. Is there a way to do this dynamically ? Thanks

Can you share a sample of your pbix? I could see what I can do





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Hi @_AAndrade I have sensitive data in the PBIX, soI am unable to share the file essentially as shown in the red box is total remit amount  I only need to sum the top15 coresponding to the Top15 programmes
So if there is a value for the Top15 programmes by forecast,  then return the remit amount for that Top 15 programme by forecast  not the Top15 programmes by remit, if that males more sense 

 

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.