The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi, i am trying to write an IF statement in a measure to essentially look at the row and determine if its international or UK. If its international then it should minus the YTD retention % by 0.82, if its UK then minus the YTD retention % by 0.90.
The results i am getting are completly wrong which is due to the use of SUMX. Is there another way i can get this IF statement to work?
Retention Target Diff =
SUMX(CountryMapping,
IF(CountryMapping[Region_L1]="United Kingdom",
[ACY21 _Retention_YTD]-0.9,
[ACY21 _Retention_YTD]-0.82))
Solved! Go to Solution.
I think you intend to sum over regions rather than the rows of CountryMapping.
Try this instead:
Retention Target Diff =
SUMX (
VALUES ( CountryMapping[Region_L1] ),
IF (
CountryMapping[Region_L1] = "United Kingdom",
[ACY21 _Retention_YTD] - 0.9,
[ACY21 _Retention_YTD] - 0.82
)
)
I think you intend to sum over regions rather than the rows of CountryMapping.
Try this instead:
Retention Target Diff =
SUMX (
VALUES ( CountryMapping[Region_L1] ),
IF (
CountryMapping[Region_L1] = "United Kingdom",
[ACY21 _Retention_YTD] - 0.9,
[ACY21 _Retention_YTD] - 0.82
)
)
Hi,
If your YTD measure is working as intended this structure should do it:
Proud to be a Super User!
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |