Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
i have a table visual with collumns containing text values and collumns containing numeric values.
I can show the Total of numeric collumns in the Total row, can i also show the total row count of a text collumn.
Column should still display the text values but with row count at the end.
Can this only be done with help of meassures or is there a built in functionallity?
Produkt | Cost | |
A | 5 | |
B | 5 | |
B | 15 | |
C | 10 | |
Total | 4 | 35 |
you can try:
SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[Produkt] ), Countrows(Produkt),
ISINSCOPE ( 'Table'[Cost] ), Sum(Cost))
You can also avoid measures even though it is not suggested
You can use count for the test and sum for numbers, aitomatic aggregations by Power BI
But can I see the model table to be sure I understood the result you want?
Hi, @FBergamaschi i have simple example with the financials test dataset.
So i selected in Summarization for collumn country: Count
No aggregation for collumn country.
When i select Count in visualisation Pannel for country it counts. But i want the behavior to still see the text values in the table (Canada, France, etc.) and only a total of the count at the buttom.
Here
for country there is no summarization and you have SUM for COGS
Here
you have now count for country, add again the country column on top of the Count of Cuontry and you get your result
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
count for the text value will give you count in the cells. If you want to see the text is cell and rowcount in the total, Using measure could be the approach.
you can try:
SWITCH (
TRUE (),
ISINSCOPE ( 'Table'[Produkt] ), Countrows(Produkt),
ISINSCOPE ( 'Table'[Cost] ), Sum(Cost))
You will to write measures to find count rows for text values and sum od values for Numerical values. and then write a measure for total and use inscope function with if for produkt and cost.