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
Nonex20
New Member

Data transformation help!

My raw data the I upload in Power BI looks like this

UsersSite 1Site 2Site 3
User 1YesNoNo
User 2NoYesNo
User 3NoNoYes
User 4YesNoNo
User 5NoYesNo
User 6NoNoYes
User 7YesNoNo
User 8NoYesNo
User 9YesNoNo
User 10NoNoYes

 

I want to transfor it using dax looking like this 

Sites Count of Users
Site 14
Site 23
Site 33


Can anyone suggest?

2 ACCEPTED SOLUTIONS
some_bih
Super User
Super User

Hi @Nonex20 check link for unpivot in Power Query part of pbi file





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






View solution in original post

Anonymous
Not applicable

Hi, @Nonex20 

Thanks for @some_bih 's useful reply. Her is supplemental.

Step1: Choose site1, site2, site3 and right clock, use Unpivot Culomns feature.

vyaningymsft_0-1719991090311.png

vyaningymsft_1-1719991190406.png

Step2:
Use this dax to create a measure in desktop.

vyaningymsft_2-1719991240989.png

Count of users = 
CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Value] = "Yes" ) )


Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. 
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum



View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi, @Nonex20 

Thanks for @some_bih 's useful reply. Her is supplemental.

Step1: Choose site1, site2, site3 and right clock, use Unpivot Culomns feature.

vyaningymsft_0-1719991090311.png

vyaningymsft_1-1719991190406.png

Step2:
Use this dax to create a measure in desktop.

vyaningymsft_2-1719991240989.png

Count of users = 
CALCULATE ( COUNTROWS ( 'Table' ), FILTER ( 'Table', 'Table'[Value] = "Yes" ) )


Best Regards,
Yang

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. 
Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum



some_bih
Super User
Super User

Hi @Nonex20 check link for unpivot in Power Query part of pbi file





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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