Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
msi
New Member

definition of rules

Hello,

 

is it possible, to define rules for graphs?

 

I have the following problem:

I want, that a graph should only be shown, if the table behind has a certain number of rows. If the number of rows is smaller, the graph should not be shown.

 

Thank you

 

1 ACCEPTED SOLUTION

@msi Just a quick IF check. Here is a quick example. I created two measures against two columns to prove the point, yours would just be a single measure against the value you are taking the sum of.

Validate Against Enough = IF(SUM('Check Table'[Enough]) > 100, SUM(graph[value]), BLANK())

visual check.PNG

The graph on the left looks at a total value where the other un-related table is 40, my measure checks to see if the total is over 100. The graph on the right illustrates what shows up if the total meets the threshold of 100, in this case the sum of that column was 200. The measure dictates whether or not anything is shown on the chart by just checking that a condition has been met.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

View solution in original post

5 REPLIES 5
msi
New Member

Is it possible to define rules for graphs in PowerBI?

 

If have the following problem:

I want to show a graph only, if the table behind the graph contains a defined number of rows. 

 

Thank you for your support

 

@msi Posted response in your other thread with the same question:

http://community.powerbi.com/t5/Service/definition-of-rules/m-p/430306#M45968


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

@msi Depends on what you mean by "graph to be shown", if the visual can be present without the values, then you can accomplish this by using DAX in the measure you are using in the graph to check for that threshold. If it is met, you would show the line/bar if not it wouldn't show anything. You could do the same thing with a tooltip and "sort of" get visual to appear/not appear. But if you are referring to a conditional bookmark, that functionality isn't there yet. But that is a fantastic idea...


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Thanks for your reply! Can you please tell me, which DAX function I can use for that? The graph can be shown, but without values. (Background: if the number of cases is lower then 10, then values should not be shown)!

@msi Just a quick IF check. Here is a quick example. I created two measures against two columns to prove the point, yours would just be a single measure against the value you are taking the sum of.

Validate Against Enough = IF(SUM('Check Table'[Enough]) > 100, SUM(graph[value]), BLANK())

visual check.PNG

The graph on the left looks at a total value where the other un-related table is 40, my measure checks to see if the total is over 100. The graph on the right illustrates what shows up if the total meets the threshold of 100, in this case the sum of that column was 200. The measure dictates whether or not anything is shown on the chart by just checking that a condition has been met.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors