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 Guys,
I have a problem which shouldnt be that difficult to solve, but I'm new to DAX and can't handle it.
What I am searching for is the Sum of values based on a ID.
Example:
ID | VALUE
1 1
1 2
2 3
2 3
3 4
3 1
3 3
Result should be
ID
1 =3
2 = 6
3 = 8
Hi @Anonymous,
What is your excepted result then?
Regards,
Frank
Hi @Anonymous,
Does that make sense? If so, kindly mark my answer as a solution to close the case.
Regards,
Frank
Hi,
Drag ID to the Table visual and write this measure
=SUM(Data[Value])
Hope this helps.
Hi @Anonymous,
One sample for your reference. Here I create a calculated table using the formula.
Table = SUMMARIZE(Table1,Table1[ID],"ID ",Table1[ID]&"="&SUM(Table1[VALUE]))
The result as below:
If it doesn't meet your requirement, please refer to Table2.
Table2 = SUMMARIZE(Table1,Table1[ID],"ID ",SUM(Table1[VALUE]))
For more details, please check the pbix as attached.
Regards,
Frank
If you put it in a table in PowerBI you get your results right? Why do you need it in an aggregated format? It will do it at "run time"
Otherwise you can Add a table in PowerBI with the following DAX:
Table = SUMMARIZE(Sheet1; Sheet1[ID]; "Total Value"; sum(Sheet1[VALUE]))
This code will return an aggregated table.
I would like to have it as a measure instead as a additional column in the table.. The GroupBy Function also doesnt work, it doesnt add the values though I selected it..
It is again a similar issue as below.
Please follow the below link, (Solution without using DAX)
https://community.powerbi.com/t5/Desktop/max-date-for-each-source-from-a-folder/m-p/522111#M244267
.
Proud to be a PBI Community Champion
Can you try the following code:
SUMMARIZECOLUMNS(Tags[value], "ID", COUNT(Tags[value]))
https://msdn.microsoft.com/en-us/query-bi/dax/summarizecolumns-function-dax
Thanks for your answer. Im getting the following Error:
"The expression refers to multiple columns. Multiple Columns cannot be converted to a scalar value"
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |