Hi 🙂,
I'm trying to create a calculated table from another table (the original actually has more columns) like this example:
to reach this final state in my new table:
is the sum of the value but for distinct client, so far i just have been able to create the first column using:
table = DISTINCT(OriginalTable[Client])
create a measure will not do the work because i will be adding new columns to this modified table to be able to create a specific chart
Hope can anyone help, thank you in advance for your time!!
Solved! Go to Solution.
Hi @Midguel
you can use SUMMARIZE() https://docs.microsoft.com/en-us/dax/summarize-function-dax
and create new calculated table like
New Table = SUMMARIZE(OriginalTable, OriginalTable[Client], "Value", SUM(OriginalTable[Value]))
if you need more column to group use like
New Table = SUMMARIZE(OriginalTable, OriginalTable[Client], OriginalTable[OtherColumn], "Value", SUM(OriginalTable[Value]))
CALCULATE(SUM([Value]))
or more complex
CALCULATE(SUM([Value]), ALLEXCEPT(Table, Table[Value]))
Hi @Midguel
you can use SUMMARIZE() https://docs.microsoft.com/en-us/dax/summarize-function-dax
and create new calculated table like
New Table = SUMMARIZE(OriginalTable, OriginalTable[Client], "Value", SUM(OriginalTable[Value]))
if you need more column to group use like
New Table = SUMMARIZE(OriginalTable, OriginalTable[Client], OriginalTable[OtherColumn], "Value", SUM(OriginalTable[Value]))
Thank you for your reply, that solution worked but now, how can i create a new calculated column in my original table that show up like this, I am bit new using DAX:
using SumValue = SUM([Value]) only displays 420 all over the column like the last column in the image
Thank you for your time @az38 and @Anonymous
@Anonymous
SUMMARIZECOLUMNS() is better but SUMMARIZE() is much more easier to understand and debug for newbies
Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.
Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!
User | Count |
---|---|
103 | |
58 | |
44 | |
29 | |
24 |
User | Count |
---|---|
133 | |
94 | |
74 | |
43 | |
41 |