Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |