Forum Discussion
antoniodneto
6 years agoRegular Visitor
Help with Expression
Hi guys, I`m new with Power BI, can you help me? I have one master filter on my dash called DATE, with 2001,2002..... 2007. is my contract date. And another called DATE_SELL with 2001,2002.... ...
- 6 years ago
Hi antoniodneto ,
You can create this measure:
Measure = VAR _max = CALCULATE ( MAX ( 'Table'[date] ), ALLSELECTED ( 'Table'[date] ) ) RETURN IF ( ISFILTERED ( 'Table'[date] ), IF ( _max IN DISTINCT ( 'Table'[date_sell] ), CALCULATE ( SUM ( 'Table'[value] ), FILTER ( ALL ( 'Table' ), 'Table'[date_sell] = MAX ( 'Table'[date_sell] ) ) ) ), SUM ( 'Table'[value] ) )no date is selectedselected date
Attached a sample file that hopes to help you: Help with Expression.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
Hi antoniodneto
I would create a new measure as
_KPI = CALCULATE(SUM('table1'[VALUE]),ALLEXCEPT('table1','table1'[date_sell]))
and use it to display the KPI values
antoniodneto
6 years agoRegular Visitor
Hi, Didn`t work.
Don`t matter wich month is selected, it returns the same value. Looks like when I select the month it accumulated all values for date_sell.
Tks!!