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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JOAP
Helper I
Helper I

Retrieve filtered total on all rows in table visual using DAX measure

I'm a beginner using DAX in Power BI Desktop and I'm currently struggling with what in the end will be a % calculation. In short I have a large FinanceFacts table (data) where I have Income Statement accounts without any summarization levels. For example sum of Total Sales is instead found in another table named IS_Nolato_1 and this table is building the structure for an Income Statement Report. I want to have my DAX measures in separate tables from tables containing data.

 

Capture.PNG

 

So I'm getting a nice table visual (filtered) of that Income Statement Report with some summarization levels but also want to calculate a DAX measure: Amount_YTD_Prod_Sales and that I succeed with:

 

Amount_YTD_Prod_Sales = CALCULATE('Measures Amounts'[Amount_YTD];FinanceFacts[Account_Level0]="IS3000")+CALCULATE('Measures Amounts'[Amount_YTD];FinanceFacts[Account_Level0]="IS3100")
 
However my issue is that the above DAX measure is only shown on rows in table visual (from table: IS_Nolato_1) where the accounts "IS3000" and "IS3100" are included in those summarized levels and I want that value on all rows to be able to calculate % of? Why are the yellow rows below without the number 91,168.00?
 
Capture.PNG
 
If I do this directly on the table FinanceFacts it works fine.
 
Capture.PNG
 
It is probably easy to fix and I have been trying to find some ideas in this Forum but failed so far. 
1 ACCEPTED SOLUTION

Hi Zoe,

Many thanks for getting back to me.

I did some more thinking and decided to change the model regarding Income Statement forms by putting them into a new common table named IS_Forms and in that table I will collect my different needs for Income Statements. By doing that I was able to make the % calculation on my table visual in the row context even more sophisticated.  Took me a while to understand and find SELECTEDVALUE which turned out great. Please see the new DAX measure below:

 

Capture.PNG

Capture.PNG

 

Best Regards,

JOAP

View solution in original post

4 REPLIES 4
JOAP
Helper I
Helper I

Solved it myself with: 

%_of_Prod_Sales_YTD = DIVIDE('Measures Amounts'[Amount_YTD];CALCULATE('Measures Amounts'[Amount_YTD_Prod_Sales];ALL(IS_Nolato_1));0)
 
Smiley Happy

However that solution will only work for table IS_Nolato_1 and therefore cannot be used as a general measure for other income statements etc? So I am not 100% happy about it and such a measure might as well be placed under the IS_Nolato_1 table.

dax
Community Support
Community Support

Hi JOAP,

 

It seems that you solve above problem, right? But you said that  “However that solution will only work for table IS_Nolato_1 and therefore cannot be used as a general measure for other income statements etc? ” If you want to apply this measure to other visual or table, you could write similar logic measure for other table. Or what requirement did you want to get? If possible, could you please inform me in details(such as your sample date or upload your pbix)?

 

 

Best Regards,

Zoe Zhi

 

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

Hi Zoe,

Many thanks for getting back to me.

I did some more thinking and decided to change the model regarding Income Statement forms by putting them into a new common table named IS_Forms and in that table I will collect my different needs for Income Statements. By doing that I was able to make the % calculation on my table visual in the row context even more sophisticated.  Took me a while to understand and find SELECTEDVALUE which turned out great. Please see the new DAX measure below:

 

Capture.PNG

Capture.PNG

 

Best Regards,

JOAP

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors