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.
I will appreciate a quick help here
In this table (table A). Confidence score is not summerised.
And no grouping.
Link to csv: https://drive.google.com/file/d/1RWPdBo8_BcGwFILGRUtBe9x9p8XAWgc8/view?usp=sharing
I need to create a measure of count of ConsumerIdTaskcodes (Grouped by ConsumerIdtaskcode) where Confidencescore (of each group) > 71.
The result desired is 6 - based on summed/aggregated grouping.
But I keep getting 2 (meaning it is checking raw data before aggregation.
Please assume you are working with Table A
Her is my measure:
Solved! Go to Solution.
You can use a measure like this in a card visual to get your desired result.
Count Over 71 =
COUNTROWS (
FILTER (
VALUES ( 'report ConsumerTaskCodes'[ConsumerIdTaskcode] ),
CALCULATE ( SUM ( 'report ConsumerTaskCodes'[confidenceScore] ) ) > 71
)
)
If you already have a measre for confidence score, you can replace the CALCULATE expression with just [ConfidenceScoreMeasure] (no CALCULATE needed if you use a measure).
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@mahoneypat solution is the way to go. Just add zero logic for blanks if you want it.
Your original post did not say that you want to do in Table A. Anyway, since you said that you want to do the way in the link above, you can do like below
Desired Measure in A =
var _ct = GROUPBY(TableA, TableA[ConsumerIdTaskcode], "Sum by ID", sumx(currentgroup(),TableA[confidenceScore]))
var _c = CALCULATE( DISTINCTCOUNT( TableA[ConsumerIdTaskcode]) , FILTER(_ct, [Sum by ID] > 71) )
RETURN IF( IsBlank(_c), 0, _c)
You can use a measure like this in a card visual to get your desired result.
Count Over 71 =
COUNTROWS (
FILTER (
VALUES ( 'report ConsumerTaskCodes'[ConsumerIdTaskcode] ),
CALCULATE ( SUM ( 'report ConsumerTaskCodes'[confidenceScore] ) ) > 71
)
)
If you already have a measre for confidence score, you can replace the CALCULATE expression with just [ConfidenceScoreMeasure] (no CALCULATE needed if you use a measure).
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
I used your TableB
and wrote the measure (nothing different than what you have)
Desired Measure =
var _c = CALCULATE(
DISTINCTCOUNT(TableB[ConsumerIdTaskCode]),
filter( TableB, TableB[ConfidenceScore] > 71)
)
RETURN IF( IsBlank(_c), 0, _c)
it worked perfectly ...
Please work with Tale A instead.
I am working with the raw data not aggregated. Hope you understand.
I saw an accepted solution and I applied same method based on Solved: dax group by measure - Microsoft Power BI Community
But it is not working for me. I have exact same issue.
Here is the dax I tried
I am getting null as answer.
Here is my csv file https://drive.google.com/file/d/1RWPdBo8_BcGwFILGRUtBe9x9p8XAWgc8/view?usp=sharing
@mahoneypat solution is the way to go. Just add zero logic for blanks if you want it.
Your original post did not say that you want to do in Table A. Anyway, since you said that you want to do the way in the link above, you can do like below
Desired Measure in A =
var _ct = GROUPBY(TableA, TableA[ConsumerIdTaskcode], "Sum by ID", sumx(currentgroup(),TableA[confidenceScore]))
var _c = CALCULATE( DISTINCTCOUNT( TableA[ConsumerIdTaskcode]) , FILTER(_ct, [Sum by ID] > 71) )
RETURN IF( IsBlank(_c), 0, _c)
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 |
---|---|
99 | |
97 | |
85 | |
70 | |
67 |
User | Count |
---|---|
116 | |
109 | |
94 | |
79 | |
72 |