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,
please recommend on the following...
I need to calculate a measure out of two columns within the same table.
One is a physical column, one is result of count-aggregation.
One column should be COUNT(Index)), the other is a disjunctive condition set by PowerQuery in field [tmp].
Values for [tmp] are either 5 or 0.
I do not get the point on how to set IF-Statement....
IF (AND([tmp]=5), COUNT([Index])>=5,5,
IF (AND([tmp]=0), COUNT([Index])>=5,4,
IF (AND([tmp]=0), COUNT([Index])=4,3,
IF (AND([tmp]=0), COUNT([Index])=3,2,
IF (AND([tmp]=0), COUNT([Index])=2,2,
IF (AND([tmp]=0), COUNT([Index])=1,1,0))))
All hints welcome.
thx&brgds
Thomas
Solved! Go to Solution.
Hi @thomasreick ,
Try this measure:
Hi @thomasreick ,
Try this measure:
Hi JPPV20,
this works perfect thank you.
I think I got lost somewhere in between the brackets...
Thomas
To debug an IF statement, reduce it to it's simplest form, make that work and then build it up.
So, for starters, make the first line work. Hint : AND takes 2 parameters
@thomasreick , It need to be a measure like
Switch(True(),
(AND(Max(Table[tmp])=5), COUNT([Index]) ) >=5,5,
(AND(Max(Table[tmp])=0), COUNT([Index]) ) >=5,4
// Add others
)
Add mor conditions as per need
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |