Forum Discussion
LOD Expression from Tableau
hi,
I want to create a calculation on top of a LOD expression similar to this.
MAXSALES = {Fixed Country : MAX(SALES)} which im doing by
MAXSALES = CALCULATE(MAX('Table1''Sales'),ALLEXCEPT('Table1',Table1[country]))
I want to SUM(MAXSALES) and use it in another calculation to achieve sum(individual sales) / SUM(MAXSALES)
Can someone please help.
Thanks in Advance.
Hi mikey268 ,
Try this:
Measure = SUMX(SUMMARIZE('Table'; 'Table'[Quarter]; 'Table'[Part]; "Total"; MAX('Table'[Cost])); [Total])
5 Replies
- camargos88Community Champion
Hi mikey268 ,
You can use CALCULATE(MAX('Table1''Sales'),ALL('Table1')), it will get the max value for this table.
Howerver, it's better if you provide a sample data. So we can check it better.
Ricardo
- mikey268New Member
Hi here is the context.
I want to write this in power bi:
SUM({FIXED DIM1, DIM2 : MAX(measure)})
- camargos88Community Champion
Hi mikey268 ,
I would say you need to aggregate first with summarize and sum them.
Can you give some example about it ?