Forum Discussion
Sarah--Flex
7 years agoFrequent Visitor
zero value to be calculated
Hi all, I've been using Power Bi for a few months and so far i love it... but i have an issue on a calculation and i cant figure it out. i hope someone has the answer. I have values in Zero,...
- 7 years ago
Hi, I've change the code slightly and it should work now. Where you are declaring the blank, try to wrap it with an ISBLANK formula as below.
HTH
D
Please mark as a solution if you are happy with the result.
=
IF (
AND ( 'Raw Data'[Metric] = "MCARs", ISBLANK('Raw Data'[Score])),
BLANK (),
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] > 6 ),
0,
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] = 5 ),
1,
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] = 4 ),
2,
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] = 3 ),
3,
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] = 2 ),
4,
IF ( AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] <= 1 ), 5, 0 )
) )))))
davehus
7 years agoMemorable Member
Hi, I've change the code slightly and it should work now. Where you are declaring the blank, try to wrap it with an ISBLANK formula as below.
HTH
D
Please mark as a solution if you are happy with the result.
=
IF (
AND ( 'Raw Data'[Metric] = "MCARs", ISBLANK('Raw Data'[Score])),
BLANK (),
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] > 6 ),
0,
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] = 5 ),
1,
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] = 4 ),
2,
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] = 3 ),
3,
IF (
AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] = 2 ),
4,
IF ( AND ( 'Raw Data'[Metric] = "MCARs", 'Raw Data'[Score] <= 1 ), 5, 0 )
) )))))
Sarah--Flex
7 years agoFrequent Visitor
Davehus,
Thank you for your quick response, it works seemesly. Have a great week.