Forum Discussion
Need assistance with SWITCH function with positive and negative percentages.
- 2 years ago
Ubedulla1988,
Read the edit in the message you responded to and see if that's what you're looking for.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.
Hi Ubedulla1988,
Again, as gmsamborn mentioned, you are incorrectly comparing a percentage with a decimal. 1.1% is not greater than 0.05 (aka 5%). 1.1% is greater than -0.05 (aka -5%) and is less than 0.05 (aka 5%) and therefore meets your second criteria. Therefore, it is correctly returning "has remained flat at" per your expected logic.
EDIT: It sounds like you might actually be wanting 0.05% and -0.05%, which are 0.0005 and -0.0005 respectively.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)
P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.
Would you please suggest me, who would i achive this, The requirement
I have a requirement to show "increased", "decreased" and "remained flat at".
I have a measure which returns percentage, If the percentage is between -0.05 and 0.05 then "remained flat at".
If percentage is > 0.05 then "increased"
If percentage is > -0.05 then "increased".
- Wilson_2 years ago
Memorable Member
Ubedulla1988,
Read the edit in the message you responded to and see if that's what you're looking for.
----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)P.S. Need a more in-depth consultation for your Power BI data modeling or DAX issues? Feel free to hire me on Upwork or DM me directly on here! I would love to clear up your Power BI headaches.