Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Salman_85
Frequent Visitor

Help require in DAX Formula Power BI

I add measure for percent of column total for cluster column chart but when i filter any question Column Percentage in chart are

not matching with table.DAX.PNG

 

 

Perent of Total =
DIVIDE (
COUNTA(Sheet1[MAIN_ID]),
CALCULATE ( COUNTA(Sheet1[MAIN_ID]), ALLEXCEPT (Sheet1,Sheet1[month]) )
)

3 REPLIES 3
Seward12533
Solution Sage
Solution Sage

Hi @Salman_85what does your data model look like? Taking a stab at possible issues, I think you need a bridge/lookup table for your Questions  and set up your slicer on that on that table rather than your data table. If you already have a lookup table that your slicing against make sure you using the values from that slicer table on yoru axis rather than the one form your data table.  

 

 

If you dont' know how, you can build this in Power Query (edit quries) by copying your table, removing all the other columsn and removing duplicates. You then relate that table to your data table

Thanks @Seward12533 for your reply.

 

Actually I have survey data where some of question are multiple response so i aggregate data for them but problem is when i unpoivt data base are change. 

For example i have 4091 in Jan 4162 in Feb respondent but after aggregate total become more than that which effect the percentages. 

Please share you email or skype so I can share PBIX file.

As I mentioned in my email you were counting the individual rows which is why your unpivoted data was blowing up since there were many respones for when each question has its own row.  You should use either a MEASURE to calculate the DISTINCTCOUNT of the survey IDs or drag the survey IDs into the values and choose Count Distict calculation option.  I woudl strongly recommend learning some basic DAX and using measures as they are much more flexible and powerful than using the Visuals controls to get the results.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.