The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Is there a way to hide grand total on a table if it is filtered to just one row. In my example below I would like to have Total Distinct Conflicting Courses hidden when the filter on the left produces only one row in the table. I don't want it to show 53 twice.
Please don't tell me to turn Totals off becuase I want the total if there are more than one row (see example below).
Solved! Go to Solution.
Hi , @EAIR
According to your description, you do not want to show the total when the matrix visual has only one row.
Here are the steps you can refer to :
(1)This is my test data:
I create a [Sum] measure to test:
(2)We can create a measure like this:
Measure = var _t = SUMMARIZE( ALLSELECTED('Table') , 'Table'[Class] , 'Table'[Student] ,"Sum" , [Sum Measure])
var _line_count = COUNTROWS(_t)
return
IF(_line_count=1 && NOT( ISFILTERED('Table'[Class])) , BLANK(),[Sum Measure])
(3)Then we can put the measure on the visual and we can meet your need.
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi , @EAIR
According to your description, you do not want to show the total when the matrix visual has only one row.
Here are the steps you can refer to :
(1)This is my test data:
I create a [Sum] measure to test:
(2)We can create a measure like this:
Measure = var _t = SUMMARIZE( ALLSELECTED('Table') , 'Table'[Class] , 'Table'[Student] ,"Sum" , [Sum Measure])
var _line_count = COUNTROWS(_t)
return
IF(_line_count=1 && NOT( ISFILTERED('Table'[Class])) , BLANK(),[Sum Measure])
(3)Then we can put the measure on the visual and we can meet your need.
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you! Now, is there a way to remove the word Total but keep it when there is more than one row? Please don't tell me to turn off total becuase I still want it when there are more than one row in the table.
I had to remove ", 'Table'[Student]" from the dax you gave me to get it to work (see my measure belew).
Hi, @EAIR
You want to close total on a line. Based on my tests, I didn't find a way to not show Total based on a certain condition.We can currently only show "total" by returning null values for total, but there is no way to turn off displaying "total" for a row.
If you want to make your suggestions and optimizations, you can post your ideas to ideas to help the product get better:
Ideas (powerbi.com)
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@EAIR , You can hide, you might have to create a filter like
new measure =
Var _cnt = countrows(Summarize(Table, (Table[Course]) , "_1",[Confliting Course total]))
return
if(isfiltered(Table[Course]) , [Confliting Course total] , if(_cnt >1, [Confliting Course total], blank() ) )
Thanks for the help. I couldn't seem to get the first part of your dax to work. So I opened a new window imported the data and created the table again. But this time I left the column names alone. So the column names are the same names as they are in the data. Any idea why it doesn't like the column [ConflictingCourseSection]?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
93 | |
81 | |
63 | |
56 |
User | Count |
---|---|
247 | |
122 | |
110 | |
77 | |
72 |