March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Team,
I am trying to create a measure which gives a CPTV value(Measure [CPTV]= [ClaimCount]/[VehicleCount]*1000), but it is showing the incorrect total.
Slicers on page ModelYear, ProductLine and Claimclass
I tried using
Solved! Go to Solution.
Hi, @Charitha_RK
You can try the following methods.
CPTV =
var ClaimCount = SUM(Warranty_Registration[CLAIMS_COUNT])
var VehicleCount = COUNT(Warranty_Registration[VEHICLES])
var res = CALCULATE(ClaimCount/VehicleCount*1000, ALLSELECTED(Warranty_Registration))
return res
CPTV NEW = Var _table=SUMMARIZE(Warranty_Registration,Warranty_Registration[CLAIMCLASSDESC],"SUM",[CPTV])
Return
IF(HASONEVALUE(Warranty_Registration[CLAIMCLASSDESC]),[CPTV],SUMX(_table,[SUM]))
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Charitha_RK
You can try the following methods.
CPTV =
var ClaimCount = SUM(Warranty_Registration[CLAIMS_COUNT])
var VehicleCount = COUNT(Warranty_Registration[VEHICLES])
var res = CALCULATE(ClaimCount/VehicleCount*1000, ALLSELECTED(Warranty_Registration))
return res
CPTV NEW = Var _table=SUMMARIZE(Warranty_Registration,Warranty_Registration[CLAIMCLASSDESC],"SUM",[CPTV])
Return
IF(HASONEVALUE(Warranty_Registration[CLAIMCLASSDESC]),[CPTV],SUMX(_table,[SUM]))
Is this the result you expect? Please see the attached document.
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Charitha_RK Try to create a mesure like this and use calculate instead of sumx:
CPTV = CALCULATE([ClaimCount]/[VehicleCount]*1000, ALLSELECTED(Warranty_Registration))
The ALLSELECTED function removes any filters applied to the slicers and returns all the rows in the table. This should allow you to calculate the correct total value for your CPTV measure, even when other slicers are selected.
If you find this insightful, please provide a Kudo and accept this as a solution.
Hi Devesh, It is giving the same results.
Also [ClaimCount] is a measure = SUM(Warranty_Registration[CLAIMS_COUNT])
and [VehicleCount] = COUNT(Warranty_Registration[Vehicles])
I tried this as well, same results
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
122 | |
79 | |
59 | |
58 | |
44 |
User | Count |
---|---|
179 | |
120 | |
82 | |
70 | |
53 |