Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Community,
Need your! Can anyone tell me why when I do not have a selection on the two VAR below 'aaa' and 'bbb', my chart is blank?
Can I get anyone's support to adjust the function in order to have the bit "VAR SUM_ORC = CALCULATE(SUM(t_Incorridas_SGC[Incorridas_Totais_Recurso]))" working, even if there are no selections at all?
Thank you so much!
Solved! Go to Solution.
@Anonymous Guess, you are looking for a Measure something like this... Show the relevant sum while there is a selection and if there is no selection then show total sum.
Test232 = VAR _SelectedSUM = CALCULATE(SUM(emp[sal]),FILTER(emp,emp[deptno] = SELECTEDVALUE(emp[deptno]))) VAR _TotalSUM = SUM(emp[sal]) RETURN IF(ISBLANK(_SelectedSUM),_TotalSUM,_SelectedSUM)
Proud to be a PBI Community Champion
@Anonymous Guess, you are looking for a Measure something like this... Show the relevant sum while there is a selection and if there is no selection then show total sum.
Test232 = VAR _SelectedSUM = CALCULATE(SUM(emp[sal]),FILTER(emp,emp[deptno] = SELECTEDVALUE(emp[deptno]))) VAR _TotalSUM = SUM(emp[sal]) RETURN IF(ISBLANK(_SelectedSUM),_TotalSUM,_SelectedSUM)
Proud to be a PBI Community Champion
Hi there,
Actually I found a small issue with the behaviour that it turned out.
With your logic applied, I was able to retrieve data even if no selections were made, however, when making a selection by month, it will not give values for that particular month, instead it retrieves the sum of it.
TEST =
@Anonymous Try changing your measure logic as below, (Changed the filter criteria to filter based on any fields selection instead of specific fields)
Test232 = VAR _SelectedSUM = CALCULATE(SUM(emp[sal]),ALLSELECTED(emp)) VAR _TotalSUM = SUM(emp[sal]) RETURN IF(ISBLANK(_SelectedSUM),_TotalSUM,_SelectedSUM)
It's always worth sharing some sample data and expected output to understand the scenario in detail.
Proud to be a PBI Community Champion
Still not what I want to achieve.
I have adjusted my function to this:
TEST =
Smooth!
Thanks a lot for your help.
so theThe first VAR seems to be incorrect
VAR bbb = CALCULATE(SELECTEDVALUE(t_Detalhe_Processos_Fases_Tarefas[Ref_GIP]))
It will always return blank if nothing is selected in t_Detalhe_Processos_Fases_Tarefas[Ref_GIP] and so the filter will return a blank set of rows, resulting in a blank chart
I think you need to change the logic of VAR bbb
Thank you!
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |