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.
Hi All,
Can some one help me to get the desired result. Not sure if the formula is incorrect.
Data
Classification | IdPerson |
A | 1 |
A | 2 |
B | 1 |
B | 2 |
B | 3 |
C | 2 |
C | 3 |
Classification |
A |
B |
C |
Classification_dup |
A |
B |
C |
Result should be
Classified | A | B | C |
A | 0 | 2 | 1 |
B | 2 | 0 | 2 |
C | 1 | 2 | 0 |
But in Power Bi its not coming as expected.
Solved! Go to Solution.
Hi @RanjanThammaiah ,
You can create a measure as below:
Count of Person =
var _t1=CALCULATETABLE(VALUES('Data'[IdPerson]),FILTER(all('Data'),Data[Classification]=MAX('Classification'[Classification])))
var _t2=CALCULATETABLE(VALUES('Data'[IdPerson]),FILTER(all('Data'),Data[Classification]=MAX('Classification_dup'[Classification_dup])))
var _t3=INTERSECT(_t1,_t2)
return if(MAX('Classification'[Classification])=MAX('Classification_dup'[Classification_dup]),0,COUNTROWS(_t3))
Best Regards
Rena
Hi @RanjanThammaiah ,
You can create a measure as below:
Count of Person =
var _t1=CALCULATETABLE(VALUES('Data'[IdPerson]),FILTER(all('Data'),Data[Classification]=MAX('Classification'[Classification])))
var _t2=CALCULATETABLE(VALUES('Data'[IdPerson]),FILTER(all('Data'),Data[Classification]=MAX('Classification_dup'[Classification_dup])))
var _t3=INTERSECT(_t1,_t2)
return if(MAX('Classification'[Classification])=MAX('Classification_dup'[Classification_dup]),0,COUNTROWS(_t3))
Best Regards
Rena
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 |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |