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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Human
Frequent Visitor

Help with total number of column that have a specific value

Hi,

I have a table that I need to calculate the total number of tanks that was active for the day either by dax or calculated column. These tanks are represented by each column and the active state is signified by the value of (1). So, for example, for 15/8/2023 should have 4 active tank since there are 4 column that have the value (1) registered. I've tried to sum up by rows but it was inaccurate as the active state for the tanks was not always aligned.

 

Human_0-1697184759744.png

Any help is much appreciated.

2 REPLIES 2
thuoc115
Advocate I
Advocate I

You standardize the data type

Thank you for your reply @thuoc115 but I'm not sure how to do that as I am fairly new to Power BI. But I found another solution to the problem by referring to this post = https://community.fabric.microsoft.com/t5/Desktop/Power-Query-count-columns-with-specific-values/td-... . I unpivot the related column on Power Query and used DISTINCTCOUNT on the attribute (tanks) on the Report View and it display what I wanted properly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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