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
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
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.