Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I have a Table,
| N_Name | O_Name | O_Status | patID |
| A | O1 | Completed | 8652 |
| A | O1 | Completed | 8652 |
| A | O1 | Completed | 8652 |
| A | O1 | Completed | 8718 |
| A | O1 | Completed | 8718 |
| A | O1 | Completed | 8718 |
| A | O2 | Completed | |
| A | O2 | Completed | |
| A | O2 | Completed | |
| A | O3 | New | |
| A | O4 | In Progress | |
| A | O4 | In Progress | |
| B | O5 | Completed | 8126 |
| B | O5 | Completed | 8126 |
| B | O5 | Completed | 8126 |
| B | O5 | Completed | 8126 |
| B | O5 | Completed | 8126 |
| B | O5 | New |
I wanted produce a table visualization which looks like the below,
I wrote a dax query,
count = IF(ISNUMBER(DISTINCTCOUNT('Table'[PATID])),DISTINCTCOUNT('Table'[PATID]), 0)
But this produces a table like counting the null values of patID to be 1,
Please help with correct dax query to avoid the above null values.
Thanks
Solved! Go to Solution.
Hi,
This measure works
Count = coalesce(CALCULATE(DISTINCTCOUNT(Data[patID]),Data[patID]<>blank()),0)
Hope this helps.
Why have you used the ALL function there? Try this measure
x_Applications Acted Upon = CALCULATE(DISTINCTCOUNT('Left Join'[LOANS.PAT_ID]), 'Left Join'[Application Status] == "Acted",'Left Join'[LOANS.PAT_ID]<>BLANK())
Thank you so much Sir
Hi,
This measure works
Count = coalesce(CALCULATE(DISTINCTCOUNT(Data[patID]),Data[patID]<>blank()),0)
Hope this helps.
Sir, a quick question,
How do i implement the same (i.e) avoiding the null values
if my original dax query is something like the below,
Why have you used the ALL function there? Try this measure
x_Applications Acted Upon = CALCULATE(DISTINCTCOUNT('Left Join'[LOANS.PAT_ID]), 'Left Join'[Application Status] == "Acted",'Left Join'[LOANS.PAT_ID]<>BLANK())
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 |
|---|---|
| 50 | |
| 44 | |
| 41 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 68 | |
| 32 | |
| 32 | |
| 32 |