Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello. Ashish Mathur was able to help me with the first part, getting MOM for a chart.
This is a part two to that, and a new question.
In addition to MoM, I'm looking to get QoQ and YoY.
these are my current tools and code.
the Matrix where my data is, the slicer based off of the field and parameter created (right)
My code in my measure is below.
I first tried the selectvalue function but it was incompatible with the field parameter, and I tried it with 1 and "1". neither solved the problem.
I then created an IF code and that doesn't seem to allow me to switch based on user choice.
I'm stuck on this code below.
______________________________________________________________________________________________________________________
Solved! Go to Solution.
Hi, @StevenT
Regarding the issue you raised, my solution is as follows:
We suggest you use the _tblDateDD Order column as the parameter for the SELECTEDVALUE() function. As shown in the image below, the values corresponding to the _tblDateDD Fields column in the _tblDateDD table are the names of the columns you selected:
Here is the modification to the judgment part, which we hope will be helpful to you:
SWITCH (
TRUE (),
SELECTEDVALUE ( '_tblDateDD'[_tblDateDD Order] ) = 1, "month",
SELECTEDVALUE ( _tblDateDD[_tblDateDD Order] ) = 2, "quer",
"year"
)
Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This was a great help and thank you. I used your ideas and they worked great. Appreciated it!
Hi, @StevenT
Regarding the issue you raised, my solution is as follows:
We suggest you use the _tblDateDD Order column as the parameter for the SELECTEDVALUE() function. As shown in the image below, the values corresponding to the _tblDateDD Fields column in the _tblDateDD table are the names of the columns you selected:
Here is the modification to the judgment part, which we hope will be helpful to you:
SWITCH (
TRUE (),
SELECTEDVALUE ( '_tblDateDD'[_tblDateDD Order] ) = 1, "month",
SELECTEDVALUE ( _tblDateDD[_tblDateDD Order] ) = 2, "quer",
"year"
)
Here's my final result, which I hope meets your requirements.
Please find the attached pbix relevant to the case.
Best Regards,
Leroy Lu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This was a great help and thank you. I used your ideas and they worked great. Appreciated it!