Forum Discussion
midrississi
5 years agoFrequent Visitor
Calculated column based on formula, filter, month and year - using slicer
Hello everybody, I'd like to ask you for help with a calculated column, I'll use the following table to demostrate it on an example, Table In order to get the Requested column NEW_P...
- 5 years ago
Try this. If it doesn't work I'd need the pbix to run some tests (or a pbix with dummy data that repros the issues)
New price = VAR lastMonth_ = CALCULATE ( MAX ( 'Table'[NO_MONTH] ), ALLSELECTED(), SUMMARIZE('Table','Table'[ID_ITEM],'Table'[NO_YEAR] ) ) VAR priceMoisAnnee_ = CALCULATE ( MAX ('Table'[PRICE]), 'Table'[NO_MONTH] = lastMonth_, ALLSELECTED(), SUMMARIZE('Table','Table'[ID_ITEM],'Table'[NO_YEAR] ) ) RETURN priceMoisAnnee_Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
amitchandak
Super User
5 years agomidrississi , You can not use slicer value in a new column.
midrississi
5 years agoFrequent Visitor
Hi amitchandak,
thank you for your reply. But is there another solution using a calculated measure, for example, to meet this need?
thank you in advance for your return