Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
I have 3 columns (Investment, Investment Status, and Line Item Detail). I need a DAX measure (I don't have access to the dataset) to see if an investment has more than one status.
| Investment | Investment Status | Line Item Detail |
| A | Approved | 1 |
| A | Approved | 2 |
| A | Not Approved | 1 |
| B | Approved | 1 |
| B | Approved | 2 |
So in this example I need to know that Investment A has more than 1 status and Investment B only has 1 status.
I have been trying to use SUMMARIZE to get a distinct set of investments and statuses, but when I use COUNTROWS I get 1 for each line. I don't know how to compare the summarized table to the current row while only looking at the investment name. Maybe that is not the right path to take though.
Solved! Go to Solution.
Measure=CALCULATE(DISTINCTCOUNT(Sample[Investment Status]),ALLEXCEPT(Sample,Sample[Investment]))
Measure=CALCULATE(DISTINCTCOUNT(Sample[Investment Status]),ALLEXCEPT(Sample,Sample[Investment]))
That works Thank you! That was much simpler than the path I was headed down.
I think you're overcomplicating it.
If you create a table visual, drag the Investment on. Create a measure using DISTINCTCOUNT on the Investment Status.
Add that to the visual.
That will give the distinct count of each investment.
If you want "1" or "more than 1" just alter the measure by putting the distinctcount in a variable, then use an 'if' to test the value > 1.
Let me know how you get on.
That would work if I didn't need need every field on the visualization. I actually need all 3 columns in the viz plus the other column created from the measure. I should have put that in the original description.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 8 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 23 | |
| 14 | |
| 10 | |
| 6 | |
| 5 |