cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarioLorenzo Regular Visitor
Regular Visitor

Button chart or possible solution

Hi guys, my name is Mario and this is my first post Smiley Happy

 

Recetly i stared to work again whit PowerBI. I attack the data from a cube (Analysis Services) and i want to change showed data into a chart.

 

In this moment i have two charts: one for  'Real income' vs 'Budget' and other for  'Real income amount' vs 'Budget amount'

 

I want to put both of these chart in the same one. To try to do it i have created this two measures:

gr_BUDGET = IF([Measure_CLICK]=TRUE;[Budget amount];[Budget]) 

gr_REAL = IF([Measure_CLICK]=TRUE;[Real income amount];[Real income])

 

Measure_CLICK = TRUE -----> so it shows AMOUNT's;

 

Do you know if it could be able to do it it a checkbox or button? Other solution?

 

Thanks a lot!

2 ACCEPTED SOLUTIONS

Accepted Solutions
Community Support Team
Community Support Team

Re: Button chart or possible solution

Hi @MarioLorenzo,

 

I'd like to suggest you to use slicer to instead, below is sample steps:

1. Create a table as the source of slicer.

SelectTable= UNION(ROW("Name","Combo A"),ROW("Name","Combo B")

 

2. Write a measure to get the selected item from slicer.

 

Selected= IF(HASONEVALUE(SelectTable[Name]),VALUES(SelectTable[Name]),BLANK())

 

 

3. Write a measure based on selected item.

BUDGET=IF([Selected]="Combo A",[Budget amount],[Budget])

REAL=IF([Selected]="Combo A",[Real income amount],[Real income])

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

View solution in original post

Highlighted
MarioLorenzo Regular Visitor
Regular Visitor

Re: Button chart or possible solution

Hi @v-shex-msft and thanks for your solution.

 

Finally i added a new table to the cube NOT LINKED (it was a Analysis Services, i cannot create a new table into Power BI Desktop)

 

tableName: DimChecker

 

 

| FIELD   |  VALUE  |
| ------  | ------- |
| Monthly |     1   | 
| Amount  |     0   | 

 

 

Using that table i did one mesasure more

 

M_checker = IF(VALUES(DimChecker[Value])=1;TRUE();FALSE())  

 

it's working perfect! Smiley Happy Smiley Happy

 

Thank you so much.

 

Regards!

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Button chart or possible solution

Hi @MarioLorenzo,

 

I'd like to suggest you to use slicer to instead, below is sample steps:

1. Create a table as the source of slicer.

SelectTable= UNION(ROW("Name","Combo A"),ROW("Name","Combo B")

 

2. Write a measure to get the selected item from slicer.

 

Selected= IF(HASONEVALUE(SelectTable[Name]),VALUES(SelectTable[Name]),BLANK())

 

 

3. Write a measure based on selected item.

BUDGET=IF([Selected]="Combo A",[Budget amount],[Budget])

REAL=IF([Selected]="Combo A",[Real income amount],[Real income])

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

View solution in original post

Highlighted
MarioLorenzo Regular Visitor
Regular Visitor

Re: Button chart or possible solution

Hi @v-shex-msft and thanks for your solution.

 

Finally i added a new table to the cube NOT LINKED (it was a Analysis Services, i cannot create a new table into Power BI Desktop)

 

tableName: DimChecker

 

 

| FIELD   |  VALUE  |
| ------  | ------- |
| Monthly |     1   | 
| Amount  |     0   | 

 

 

Using that table i did one mesasure more

 

M_checker = IF(VALUES(DimChecker[Value])=1;TRUE();FALSE())  

 

it's working perfect! Smiley Happy Smiley Happy

 

Thank you so much.

 

Regards!

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 342 members 3,371 guests
Please welcome our newest community members: