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
joshcomputer1
Helper V
Helper V

Get Distinct Count of Audits

I have a fairly complex project here that I need help with.  I have included the file via dropbox link below. Capture1.PNG

 

 I have two filters (month and indicator).  When you select them, the data is filtered correctly (I think).  The name of the measure is QuestionNumPerc  (question number percentage).  I want it to show the percentage of times the question was answered "yes".  In order to do this, I had to create two calculated columns to add the yes or no responses separately. 

 

QuestionNumPerc = sum('DataSet'[QuestionNumYes]) / (sum('DataSet'[QuestionNumYes])+sum('DataSet'[QuestionNumNo]))

 

I believe this is working correctly. There are two problems on this slide....

1. I want the top right corner to show total audits. Each audit has 39 yes or no questions. How do I get a count of unique audits? I did an unpivot so it took the 39 yes or no columns and made a bunch of rows instead.  This works for counting the individual question of the audit but not the number of audits. 

 

2. The month selection is numerical. How do I get monthname in sequential order?

 

 

Indicator Analysis tab of Project1

1 ACCEPTED SOLUTION

Hi @joshcomputer1

 

2) You have to go in your Date Table, select the Monthshort Column and then click in the sort by as the picture below and get back to your report.

Let us know if it did not work...

CapturePBI.PNG

View solution in original post

3 REPLIES 3
Interkoubess
Solution Sage
Solution Sage

Hi @joshcomputer1,

 

1) Did you try Distinctcount?

 

QuestionNumTotal = DISTINCTCOUNT('DataSet'[QuestionNum])

 

2) To get the sequential order, go to your date table, select your column (Monthshort) and sort by MonthNum ( select the sort by on the right corner).

 

I can resend your file corrected if it did not fix your requests.

 

Thx

 

 

1. Solution works great.  I used a different column, but this is what I needed.

 

2. I grabbed Monthshort and put it in the values on the month filter.  When I click on the three dots to try and sort by MonthNum, it isn't listed there. The only sort there is Monthshort. Am I doing this in the wrong place?

 

Capture1.PNG

Hi @joshcomputer1

 

2) You have to go in your Date Table, select the Monthshort Column and then click in the sort by as the picture below and get back to your report.

Let us know if it did not work...

CapturePBI.PNG

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.