Forum Discussion
Getting a table from a measures and slicer values
- 7 years ago
Hi azeem_3a ,
Based on what you have presented I can duplicate your requested output. I have added a column in Power Query, although you can add it in Power BI. Simple if statement comparing the Plan and Actual and if not equal give it a 1. Call it Not completed. My table is call code. Then a measure.
Distinct count of projects = DISTINCTCOUNT(code[Code])
and another
Completed projects = [Distinct count of projects] - max(code[Not completed])
works on a card or table.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
azeem_3a ,
Go to power query, and create a conditional column as in pic, then add your slicer with the dates, add a table, with Class, and then add the conditional column, using the arrow, select sum. See pic. Make sure your new col is of type whole number.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Hi Nathaniel_C
Thanks for the reply, but my issue is a bit different one.
I have obtained my table through summarized function hence can not edit through query.
Also my requirement is when i select all the dates until 1st April(Jan,Feb, Mar,Apr), it should show like this. (Since both classes have completed all the codes in the given month period)
| Class | Completed Codes |
| A | 2 |
| B | 2 |
When I select all the dates until 1st May it should show like this. (Since Code 100 in Class A for the month of May they havent completed)
| Class | Completed Codes |
| A | 1 |
| B | 2 |
Requirement is to check, for the selected periods whether the codes required to complete are complete or not.
Please assist me on this.
Thanks
- Nathaniel_C7 years ago
Community Champion
Hi azeem_3a ,
Please give us more information, First, is this a classroom assignment or a business assignment? Second, what software are you worrking with? Does not my picture match your expected results?
Thank you,
Nathaniel
- azeem_3a7 years agoFrequent Visitor
Hi Nathaniel_C
Im using Power Bi and I need a dax to solve the issue.
In your picture, I get the answer I want when I click a particular month.
When I click the months Jan,Feb,March,April(ALL at Once) the result is different.
What I want is, if I select ALL months until April, it should give this result
Class Completed Codes A 2 B 2 When I click ALL Months until May, it should give me this result
Class Completed Codes A 1 B 2 Hope you understand the question.
Thanks
- Nathaniel_C7 years ago
Community Champion
Hi azeem_3a ,
Sorry, I did miss that you were going to select multiple months.