Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi PowerBI experts,
i need the products for the selected percentage.
Here is the detail description for the requirement.
This is fine example for explanation:
Here i kept 2 examples
From First pic : The selecting percentage when i select more than 50% i Need only more than 50% Selected Products only and
Second Pic : if i select percentage less than 100 i need only the products for less than 100% .
Is this possible in DAX??? Please Let me know .
Hope it will work out with DAX please help me out its very important.
Thanks
ASKumar
Solved! Go to Solution.
1.Create a what-if parameter
This will get a table named "Parameter" with a column "Parameter" and a measure "Parameter Value",
2.enter data to get a table "more/less"
Note: don't create any relationships among these two created tables with your main table.
Then add "more/less" column and "parameter" column in two slicers.
3.create measures in your main data table (sheet1 in my test)
More_OR_less = IF(SELECTEDVALUE('more/less'[more/less])="More than",1,0) selected_per = [Parameter Value] condition = SWITCH(TRUE(),[More_OR_less]=1&&SUM(Sheet1[value])>[Parameter Value],1,[More_OR_less]=0&&SUM(Sheet1[value])<[Parameter Value],0)
Finally, after adding columns in the matrix as above, click on the triangle icon of the "value" field, select "conditional formatting"->font color,
in the setting above, select "color based on rule"->select the "condition" measure.
If you want to values which meet the condition to show otherwise not show, you could create another measure and color the value based on this measure
condition2 = SWITCH(TRUE(),([More_OR_less]=1&&SUM(Sheet1[value])>[Parameter Value])||([More_OR_less]=0&&SUM(Sheet1[value])<[Parameter Value]),1,0)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
1.Create a what-if parameter
This will get a table named "Parameter" with a column "Parameter" and a measure "Parameter Value",
2.enter data to get a table "more/less"
Note: don't create any relationships among these two created tables with your main table.
Then add "more/less" column and "parameter" column in two slicers.
3.create measures in your main data table (sheet1 in my test)
More_OR_less = IF(SELECTEDVALUE('more/less'[more/less])="More than",1,0) selected_per = [Parameter Value] condition = SWITCH(TRUE(),[More_OR_less]=1&&SUM(Sheet1[value])>[Parameter Value],1,[More_OR_less]=0&&SUM(Sheet1[value])<[Parameter Value],0)
Finally, after adding columns in the matrix as above, click on the triangle icon of the "value" field, select "conditional formatting"->font color,
in the setting above, select "color based on rule"->select the "condition" measure.
If you want to values which meet the condition to show otherwise not show, you could create another measure and color the value based on this measure
condition2 = SWITCH(TRUE(),([More_OR_less]=1&&SUM(Sheet1[value])>[Parameter Value])||([More_OR_less]=0&&SUM(Sheet1[value])<[Parameter Value]),1,0)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Let me confirm your requirement:
You have a slicer listing "more than 50%, less than 100%,...ect"
In the first picture, you select "more than 50%" from the slicer, then only value which percent is more than 50% is colored by "yellow",other values remains default style.
In the second picture, you select "less than 100%" from the slicer, then only value which percent is less than 100% shows on the bar chart, other values doesn't show on the visual.
Is my understanding right?
Best Regards
Maggie
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |