Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Dear Community,
I am having difficulty writing a DAX expression, trying to calculate a percentage in a bar graph.
Expression=
CALCULATE(COUNT('Data'[RESPONDENT_ID]), FILTER('Data','Data'[QUESTION_ID] = 2 && 'Data'[Flag]="Y"))
/
CALCULATE(COUNT('Data'[RESPONDENT_ID]), FILTER('Data','Data'[QUESTION_ID] = 2 && 'Data'[Flag]="Y"))
In the second expression I have to take total count to get the percentage, i want to ignore the dimension in the second expression.
My dimension Field name is [Answer], i will considers all other filters applied but want to ignore the dimension value. it should be very simple, In Qlik we can use TOTAL keyword to achieve the same.
i have just one table in the data model.
your help will be highly apprecitade.
Many Thnaks.
Khan
Solved! Go to Solution.
@Anonymous
Did you try ALLSELECTED ?
Please share a screenshot of the visual and some sample data if possible.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
I accept KUDOS 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@Anonymous
I have not seen your data table but apply as below. Use ALL or ALLSELECTED around the 2nd filter
Expression=
CALCULATE(COUNT('Data'[RESPONDENT_ID]), FILTER('Data','Data'[QUESTION_ID] = 2 && 'Data'[Flag]="Y"))
/
CALCULATE(COUNT('Data'[RESPONDENT_ID]), FILTER(ALL('Data'),'Data'[QUESTION_ID] = 2 && 'Data'[Flag]="Y"))
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
I accept KUDOS 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Dear @Fowmy
Thanks for your comment. i tried your proposed solution, but when i use ALL Keyword as below.
@Anonymous
Did you try ALLSELECTED ?
Please share a screenshot of the visual and some sample data if possible.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
I accept KUDOS 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Great !
Appreciate it if you could you 👍 my replies.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
I accept KUDOS 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |