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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

got dinamic graphs and tables

Hello,

If I have below table "Alarms":

 

ID          Alarm1              Alarm2

------------------------------------

A              no                       yes

B              no                       no

C              yes                      no

D              yes                     yes

E              no                       yes         

 

I want to make a graph where I can get the number of Alarm1 and number of alarm2. I cerated 2 new measures, which are working fine:

 

Alarm1Count= CALCULATE(COUNT(Alarms[Alarm1]);Alarms[Alarm1]="yes") 

Alarm2Count = CALCULATE(COUNT(Alarms[Alarm2]);Alarms[Alarm2]="yes") 

 

In my report I added a table with All IDs:

A

B

C

D

E

 

So what I want to do now is if select the measeure "Alarm1Count" from the graph that I made, I want to see ID with Alarm1 equal to yes, but in the graph that I made if I select the Alarm1Count doesnt show me the meter with Alarm1=yes, it shows all Ids. How can I do it? 

1 ACCEPTED SOLUTION
v-haibl-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

You can unpivot the columns o Alarm1 and Alarm2 in Query Editor, and then filter the column to leave yes only.

got dinamic graphs and tables_1.jpg 

 

Then you do not need to create any measure and can get the desired result as below. For details, please refer to attached PBIX file.

got dinamic graphs and tables_2.jpg 

 

Best Regards,

Herbert

View solution in original post

2 REPLIES 2
v-haibl-msft
Microsoft Employee
Microsoft Employee

@Anonymous

 

You can unpivot the columns o Alarm1 and Alarm2 in Query Editor, and then filter the column to leave yes only.

got dinamic graphs and tables_1.jpg 

 

Then you do not need to create any measure and can get the desired result as below. For details, please refer to attached PBIX file.

got dinamic graphs and tables_2.jpg 

 

Best Regards,

Herbert

Anonymous
Not applicable

Awsome. It worked very well 😄

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.