Forum Discussion
Constant Line Per Filter
Good afternoon
I have a dashboard where I show the progress of enrollment according to the business line filter.
As you can see, I have 3 constant lines to the x-axis M1, M2 and M3 which have to disappear according to the filter, that is, if I select high school only M1 and M3 are shown or if I select graduate only M3 appears.
I haven't been able to get to the right conditional, you will have some example of how I can do it.
I would be very grateful.
- Anonymous2 years ago
Hi Syndicate_Admin ,
Based on the information you have provided, you can follow the steps below:
1. Create a table as a slicer.2.Add new measures.
graduate = IF ( SELECTEDVALUE ( Table2[Select] ) = "graduate", [sales_], BLANK () )high school1 = IF ( SELECTEDVALUE ( Table2[Select] ) = "high school", [number_], BLANK () )high school2 = IF ( SELECTEDVALUE ( Table2[Select] ) = "high school", [sales_], BLANK () )3.Put measures into the y-axis.
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 Replies
- Ritaf1983Super User
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - amitchandakSuper User
Syndicate_Admin , In constant line you can use measure using Fx.
You can use a measure like
if(selectedvalue(Table[Enrollment]) ="School", 50, blank())
Blank will make line to disappear
You can also consider isfiltered and hasonevalue
- AnonymousNot applicable
Hi Syndicate_Admin ,
Based on the information you have provided, you can follow the steps below:
1. Create a table as a slicer.2.Add new measures.
graduate = IF ( SELECTEDVALUE ( Table2[Select] ) = "graduate", [sales_], BLANK () )high school1 = IF ( SELECTEDVALUE ( Table2[Select] ) = "high school", [number_], BLANK () )high school2 = IF ( SELECTEDVALUE ( Table2[Select] ) = "high school", [sales_], BLANK () )3.Put measures into the y-axis.
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.