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,
I am trying to add a column to a table which calculates the subtotals by categories and repeats it on every row.
It is the last column on the right-hand side that should sum up the visit_count column by user and visit_year and write it to last column by repeating it for every user/year
I have tried SUMX but could not figure it out ,
Many thanks in advance
Solved! Go to Solution.
Hi @enestkm
try a measure
Measure = CALCULATE(SUM([Visit_Count]), ALLEXCEPT('Table', 'Table'[User], 'Table'[Visit_Year]))
do not hesitate to give a kudo to useful posts and mark solutions as solution
column with the same statement should work too. check
but measure is preffered and Im not sure your visuals will be correct in any use cases if you will use a column
do not hesitate to give a kudo to useful posts and mark solutions as solution
thanks @az38 , it worked perfectly
is this can be replicated as a custom column in query editor?
power query editor mission is data cleansing and transformation, all business logic should be calculated in DAX
maybe, you can create some M code that could calculate, but it will be not only not the best practice, but the worst practice
do not hesitate to give a kudo to useful posts and mark solutions as solution
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |