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.
Attribute | Date | CaseNumber | CaseOutcome |
Date Closed | 1/30/2003 | L1-00 | Not Substantiated |
Date Opened | 10/3/2002 | L1-00 | Not Substantiated |
Date Closed | 10/22/2003 | L2-00 | Not Substantiated |
Date Opened | 10/1/2003 | L2-00 | Not Substantiated |
Date Closed | 1/3/2005 | L3-00 | Substantiated |
Date Opened | 1/1/2005 | L3-00 | Substantiated |
It was doing a percent of grand total initially so I tried to create a measure like this:
Solved! Go to Solution.
Hi @StoryofData ,
The error message you are seeing is because the DISTINCTCOUNT function is expecting a single column as input, but you are passing it multiple columns.
You can still use your measure, but with a few changes:
aa =
VAR _count1 =
CALCULATE (
DISTINCTCOUNT ( [CaseNumber] ),
FILTER ( 'Query1', [CaseOutcome] = "Substantiated" )
)
VAR _count2 =
CALCULATE (
DISTINCTCOUNT ( [CaseNumber] ),
ALLEXCEPT ( 'Calendar', 'Calendar'[Fiscal Year] )
)
RETURN
DIVIDE ( _count1, _count2 )
Or please try this measure, you can then change it based on your formula
Measure = var _count1=CALCULATE(DISTINCTCOUNT('Query 1'[CaseNumber]),FILTER('Query 1',[CaseOutcome]="Substantiated"))
var _count2=DISTINCTCOUNT('Query 1'[CaseOutcome])
return DIVIDE(_count1,_count2)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @StoryofData ,
The error message you are seeing is because the DISTINCTCOUNT function is expecting a single column as input, but you are passing it multiple columns.
You can still use your measure, but with a few changes:
aa =
VAR _count1 =
CALCULATE (
DISTINCTCOUNT ( [CaseNumber] ),
FILTER ( 'Query1', [CaseOutcome] = "Substantiated" )
)
VAR _count2 =
CALCULATE (
DISTINCTCOUNT ( [CaseNumber] ),
ALLEXCEPT ( 'Calendar', 'Calendar'[Fiscal Year] )
)
RETURN
DIVIDE ( _count1, _count2 )
Or please try this measure, you can then change it based on your formula
Measure = var _count1=CALCULATE(DISTINCTCOUNT('Query 1'[CaseNumber]),FILTER('Query 1',[CaseOutcome]="Substantiated"))
var _count2=DISTINCTCOUNT('Query 1'[CaseOutcome])
return DIVIDE(_count1,_count2)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
also tried this:
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
98 | |
81 | |
65 | |
62 |
User | Count |
---|---|
147 | |
116 | |
104 | |
88 | |
65 |