Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello guys,
I am struggling trying to define this DAX statement,
basically I have a table where there are ID_SELLER, NAME SELLER, MONTH NUM and I want to insert GOAL VALUE differently through the months for each seller
So for instance if ID_SELLER == 300 && MONTH NUM == 1, GOAL VALUE = 120000
'' MONTH NUM == 2, GOAL VALUE = 130000
later on
301 MONTH NUM == 1.... VALUE = 50000
2
I tried using SWITCH(IF(ID_SELLER == 300 && MONTH NUM == 1, TRUE()), TRUE(), 120000)
but didn't know how to continue inserting other months since DAX doesnt let me set values in variable conditions. I believe this would result in a many lines statement, does anyone have a simillar solution or can help with something?
Thank you very much
Solved! Go to Solution.
@thatjoey20 , Create a new column like
GOAL VALUE = Switch( True(),
[ID_SELLER] = 300 && [MONTH NUM] = 1, 120000,
[ID_SELLER] = 300 && [MONTH NUM] = 2,130000
//add others
)
Hi @thatjoey20 ,
Try this measure
GOAL TO REACH =
IF (
Goals[Seller ID] = 300
&& Goals[Month #] = 1,
12000,
IF (
Goals[Seller ID] = 300
&& Goals[Month #] = 2,
13000,
IF ( Goals[Seller ID] = 301 && Goals[Month #] = 1, 50000 )
)
)
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
Proud to be a Super User!
@thatjoey20 , Create a new column like
GOAL VALUE = Switch( True(),
[ID_SELLER] = 300 && [MONTH NUM] = 1, 120000,
[ID_SELLER] = 300 && [MONTH NUM] = 2,130000
//add others
)
It worked!! Thank you very much! Just needed to put true as a expression condition !
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
86 | |
85 | |
68 | |
67 | |
63 |
User | Count |
---|---|
210 | |
118 | |
116 | |
81 | |
74 |