Show All Status

(06-08-2021)_ResearchPurpose_Status.pbix (8.0 MB)
Hi,
I would like to show the statuses in the visual as the image below
In the SABS, there are three statuses(Approved, Disapproved, Submitted - not reviewed) but in the SAS-Radio there is only one Status i.e. Approved, I would like to show all three statuses whether there is any status or not like

SABS
Status

  1. Approved 22%
  2. Disapproved .6%
  3. Submitted -not reviewed .6%

SAS-Radio
Status

  1. Approved 57.82%
  2. Disapproved 0%
    3 Submitted-not reviewed 0%

Hope the requirement is clear, please let me know if you need any further clarification.

image

Thank you,
Muhammad Khan

Hi @mohammedkhan11,

There are more ways to deal with this but give this a go…
First replace the Status in your visual with the Status from the DIM table

Next set up a measure that will return a 0 for items with no values, for example:

# of Survey v2 = 
VAR myCount = COUNT(Survey[packageStatus])
RETURN
IF( SELECTEDVALUE( 'Package Statuses'[Package Statuses] ) IN { "Approved", "Disapproved", "Submitted-Not Reviewed" },
    myCount + 0,
    myCount
)

Note that I passed the 3 specified values explicitly { “Approved”, “Disapproved”, “Submitted-Not Reviewed” } in this measure. You could replace that with ALL(‘Package Statuses’[Package Statuses] ) but that will return all other items present in your DIM table as well.

Here’s the result.
image

You can repeat this for %ages.
I hope this is helpful.

1 Like

@Melissa Thank you this is very helpful could you please also share the measure for Percentage, it is not giving me correct result

image

Hi @mohammedkhan11,

Try this measure:

Survey % v2 = 
VAR myPCT = DIVIDE( [# of Survey], CALCULATE( [# of Survey], ALL( Survey) ))
RETURN
IF( SELECTEDVALUE( 'Package Statuses'[Package Statuses] ) IN { "Approved", "Disapproved", "Submitted-Not Reviewed" },
    myPCT + 0,
    myPCT
)

.
With this result.

image

1 Like

@Melissa You are the Champ, Thank you very much this is very helpful