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.
So I have a table that have a column with values and an other with the category "National" or "International". I need to calculate the average percentage of the values in the national category! And only return the value in % so that i can see it on a card.
This is the kind of data i have
Category | Value |
Nacional | 113,240,040 |
Importador | 106,828,146 |
Nacional | 97,134,688 |
Importador | 94,064,210 |
Importador | 90,575,333 |
Nacional | 35,319,980 |
And need to return this visual
I have done this
National =CALCULATE(COUNTA('SEGUIMIENTO'[Category]),'SEGUIMIENTO'[Value] IN { "Nacional" })
%National =DIVIDE([National], COUNTA('SEGUIMIENTO'[Value]))
But it does not retun the correct answer
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Hi Alison,
thanks for answering.
But the answer gives me a percentage of 96% and it should be 86 there is something that power bi is not understanding me 😂. I need it not to count the rows but the percentage of the total money. I don't know if you understand me. If i do it in a pie it shows me the correct answer.
But, muy supervisor wants to see it on a card.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Yeyy thank you.
Im new on this matter i've learned all by myself but at work i always find something more challenging stuff!
💌
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
I have it in spanish but,
Like you see in the image below
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
97 | |
75 | |
63 | |
53 |
User | Count |
---|---|
139 | |
100 | |
95 | |
85 | |
63 |