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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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

v-yaningy-msft
Community Support
Community Support

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
v-yaningy-msft
Community Support
Community Support

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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