Forum Discussion
spandy34
Responsive Resident
4 years agoMeasures- Multiple Fields Criteria
Hi I wondered if anyone can help me - I am new to DAX - I am trying to create a measure with multiple critieria - I want to count the number of records - Table Name is Main Claim Data - the field...
- 4 years ago
Category = SWITCH ( TRUE, 'Main Claim Data'[ClassOfBusiness] = "PL" && 'Main Claim Data'[Department] = "Highways" && 'Main Claim Data'[StatusFlag] = "CLOSED", "Highways PL", 'Main Claim Data'[ClassOfBusiness] = "PL" && 'Main Claim Data'[Department] <> "Highways" && 'Main Claim Data'[StatusFlag] = "CLOSED", "Other PL", 'Main Claim Data'[ClassOfBusiness] = "EL" && 'Main Claim Data'[StatusFlag] = "CLOSED", "EL", "Others" )
A category "Others" will polute your report. The easiest way to get red of it is to create a slicer of the category column and select the options you need and deselect "Others". - 4 years ago
Hi - It was my fault, it was Highway Maintenance not Highways.
THis is sorted and I really appreciate all your help - Unbelievable !!
tamerj1
Community Champion
4 years agoHi spandy34
Can you share the code of your measures? Is the green table from power bi?
spandy34
Responsive Resident
4 years agoYes the green table is from Power Bi
Name for the VIsual Claim Nos Received
No of Claims = COUNT('Main Claim Data'[ClaimRef])
Name for the VIsual Repudiation Rate
No of Claims = ([No Repudiated]/[No of Claims])*100
Name for the VIsual Repudiated Claim Nos
No Repudiated = [Count of RepudiatedFlag for True]
Repudiated £ = SUMX ( FILTER ( 'Main Claim Data', [RepudiatedFlag] = TRUE () ), [Highest Estimate] )
Name for the Visual Repudiated £
Repudiated £ = SUMX ( FILTER ( 'Main Claim Data', [RepudiatedFlag] = TRUE () ), [Highest Estimate] )
- tamerj14 years ago
Community Champion
Ok Then you need to create a calulated column that delivers the 3 categories (Highways PL, Other PL & EL) based on your condition with simple IF statements.
Then drag the new column into your matrix's culmns - spandy344 years ago
Responsive Resident
@goncalogeraldes I have had this resolved now but thank you for responding. Much appreciated