Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi - I'm new to DAX and would like some guidance to write something for a new measure:
Trying to come with a calculation
(If selected month is January then use January Measure
Else
Regular measure)
Solved! Go to Solution.
Hi there - this question is probably better being asked in the Desktop forum rather than Developer, as a lot more DAX experts frequent that particular forum and could help you faster than in here.
That being said, it should be a case of the following, assuming:
Syntax would be as follows:
[Conditional Measure] = IF( SELECTEDVALUE('Date'[Month]) = "January", [January Measure], [Regular Measure] )
It should be a case of swapping these out with your fields and measures as necessary.
Here's some further reading on SELECTEDVALUE (the SQLBI guys are pretty much essential reading for anyone who wants to learn DAX - you should make dax.guide a regular place to visit if you haven't already ;))
Good luck!
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Hi there - this question is probably better being asked in the Desktop forum rather than Developer, as a lot more DAX experts frequent that particular forum and could help you faster than in here.
That being said, it should be a case of the following, assuming:
Syntax would be as follows:
[Conditional Measure] = IF( SELECTEDVALUE('Date'[Month]) = "January", [January Measure], [Regular Measure] )
It should be a case of swapping these out with your fields and measures as necessary.
Here's some further reading on SELECTEDVALUE (the SQLBI guys are pretty much essential reading for anyone who wants to learn DAX - you should make dax.guide a regular place to visit if you haven't already ;))
Good luck!
Proud to be a Super User!
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Thank you! that worked. Will post these kind of questions under Desktop forum from now on.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
4 | |
4 | |
4 |