Forum Discussion

Txtcher's avatar
Txtcher
Helper V
11 months ago
Solved

Field Parameters And Visuals

I am preparing a report that counts backlogged complaints. This is the schema. They want the complaints (RS Case) counts by 3 different categories:  RS Cases[Region], RS Cases[Program] & RS C...
  • Anonymous's avatar
    Anonymous
    11 months ago

    Hi Txtcher ,

    Thanks lbendlin for the follow-up and for explaining everything so clearly.

    You’re absolutely right the card is giving you 0 because it doesn’t have a specific program in context the way your bar chart does. The fix is to let the measure fall back to the overall LOF backlog whenever there isn’t exactly one program in play. That way your bar chart still works, but your card will also show the right total.

    You can adjust your measure in bellow way.

    LOF_Backlog Insight =
    VAR SelectedParameter = SELECTEDVALUE(_LTCR_Dimension_par[Reg-Prog-Priority_par Order])
    VAR SelectedInsight   = SELECTEDVALUE(_LTCR_Insights_par[_LTCR_Insights_par Order])
    VAR ProgramFilter     = HASONEVALUE('RS Cases'[Program])
    RETURN
    SWITCH(TRUE(), SelectedParameter = 1 && SelectedInsight = 2 && ProgramFilter, [LOF Backlog by Program],SelectedInsight = 2, [LOF Backlog],[Backlog]) 

    Now you can achieve

    • Your bar chart will split LOF backlog correctly by each Program.
    • Your card will show the total (6 in your sample) when “Current Month LOF Backlog” is picked, even though you also selected Program in the dimension parameter.

    Just let you know that, don’t rely only on the parameter, also check whether a single Program is actually in context. If not, show the total.

    This small tweak should make both the card and the bar chart behave exactly the way you described. If you still face any issues, please share sample data are PBIX if there is no senstive data. Happy to help you.


    Thanks,
    Akhil.