Forum Discussion
Field Parameters And Visuals
- Anonymous11 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.
Field Parameters happen "before" Visual Calculations. Visual Calculations have no idea where the data came from that they are acting upon. You would have to drop the idea of visual calculations and use measures instead.