The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I cant seem to figure this problem out. I have a pbi table visual and i want to total my column 'waarde'. (so here it should sum to 26) There are some filters in the dashboard so 'id', 'regio' and 'waarde' come from the source table. and my measure should give the same result as the 'waarde' column, only with totals at the botom. But i cant seem to figure out what measure i need to use, and i dont understand what my wrong measure is showing, where it gets its values from.
This is the measure i tried
Val klachten = CALCULATE(sum(ID_Fysieke_klachten[Waarde]),filter(ID_Fysieke_klachten,ID_Fysieke_klachten[Regio]=ID_Fysieke_klachten[Regio]))
Thanks to whoevever is smarter than me
H.
Solved! Go to Solution.
Hi @HvdSteen,
at the moment the column [Waarde] of the visual corresponds to a column grouped in the rows section, right?
I would suggest to create a measure for that
Waarde total = SUM ( ID_Fysieke_klachten[Waarde] )
I might be wrong but this seems to me the simplest solution
Best
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
I figured it out, for some reason there were duplicate rows in my source table,.. thats why all the values were off. Now my old measure and all you guys sugessted work like it should work!
Hi @HvdSteen
Create a simple SUM measure and use that in the visual instead of the raw column.
Val klachten =
SUM ( ID_Fysieke_klachten[Waarde] )
Then:
Now each row will show the right number and at the bottom the total (26 in your example).
If you have duplicate Regio values and still want the total to match the visible rows, you can use this version:
Val klachten (safe) =
SUMX (
VALUES ( ID_Fysieke_klachten[Regio] ),
CALCULATE ( SUM ( ID_Fysieke_klachten[Waarde] ) )
)
This way the total in the table will always match the visible data.
i dont understand what you mean by 'grouped in rows' though,... this is the lowest level of data, so the value in 'waarde' is the actual value from the source table, not a sum of anything.
Hi @HvdSteen
If 'Waarde' is already row-level (looks like it is not aggregated) , then the measure would be:
Measure= SUM ( ID_Fysieke_klachten[Waarde] )
So i thought, but it gives the wrong results and i dont know why.
Hi @HvdSteen,
at the moment the column [Waarde] of the visual corresponds to a column grouped in the rows section, right?
I would suggest to create a measure for that
Waarde total = SUM ( ID_Fysieke_klachten[Waarde] )
I might be wrong but this seems to me the simplest solution
Best
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
I tried that, it gives the same wrong values as my current measure.
Weird, then we need to see the model
Can you share the pbix via some coud sevice and paste here th elink or the paste the table from which you are taking the data here (in a usable format), so we recreate the visual?
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
Thanks
i cant share the data, but here are some visuals -
source view is basicaly the same but without totals
User | Count |
---|---|
15 | |
12 | |
7 | |
6 | |
5 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |