Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi, how to create 2 measures with the below criteria. Here is the sample.
Example: Product=P-1 is selected, the expected result is as below.
Type | Serial No Count | Job Count |
Escalation | 2 | 2 |
Install | 2 | 2 |
Repair | 1 | 1 |
Solved! Go to Solution.
@PBI_newuser , Try measure like
Switch(true()
max(Table[Type])="Install", calculate(count(Table[Job#]), All (Data[Product]), All (Data[Team])),
max(Table[Type])="Escalation", calculate(count(Table[Job#]), All (Data[Product]), All (Data[Team])),
max(Table[Type])="Repair", count(Table[Job#])
)
or
sumx(values(Table[Type]),
Switch(true()
max(Table[Type])="Install", calculate(count(Table[Job#]), All (Data[Product]), All (Data[Team])),
max(Table[Type])="Escalation", calculate(count(Table[Job#]), All (Data[Product]), All (Data[Team])),
max(Table[Type])="Repair", count(Table[Job#])
)
)
@PBI_newuser , you can use removefilters or all for product and Team
or
allexcept(Table, Table[Type], Table[Serial No])
example
calculate(count(Table[Job#]), filter(Table, [Escalation]= "Install"), all(Table[product]), all(Table[team]))
refer examples here
https://www.linkedin.com/pulse/five-recent-power-bi-functions-you-should-use-more-often-amit-chandak
https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/
Hi @amitchandak , how to combine below 3 if statement in measure to get the output?
@PBI_newuser , Try measure like
Switch(true()
max(Table[Type])="Install", calculate(count(Table[Job#]), All (Data[Product]), All (Data[Team])),
max(Table[Type])="Escalation", calculate(count(Table[Job#]), All (Data[Product]), All (Data[Team])),
max(Table[Type])="Repair", count(Table[Job#])
)
or
sumx(values(Table[Type]),
Switch(true()
max(Table[Type])="Install", calculate(count(Table[Job#]), All (Data[Product]), All (Data[Team])),
max(Table[Type])="Escalation", calculate(count(Table[Job#]), All (Data[Product]), All (Data[Team])),
max(Table[Type])="Repair", count(Table[Job#])
)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
116 | |
82 | |
46 | |
42 | |
28 |
User | Count |
---|---|
182 | |
82 | |
71 | |
48 | |
45 |