Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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