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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Count the columns by row

Hi all, 

 

I want to count the columns by row.

The aggregated data is filtered through the slicer in the dashboard.

 

Thanks,

 

 

5 REPLIES 5
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

Please share more details about your scenario so that we could get the solution quickly.

 

If it is convenient, please share your data sample which could reproduce your scenario and your desired output.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi team, 

 

Share the pbix file below and the xlsx file, which is the data source. 

-  pbix_xlsx_file

 

First of all, the dashboard is constructed like an attachment and the figures are displayed dynamically by the slicer.

The dashboard is based on BaseSource, but there are more than 1 million sources of data.
So I reconstructed the source in the form of ChangeSource.

Based on ChangeSource, I want to get the same result as BaseSource.

 

Thanks,

Hi @Anonymous,

 

I'm still a little confused about your requirement.

 

Do you want to achieve the result like below based on the source of ChangeSource?

 

result.PNG

 

If it is, you only need to unpivot your column item1, item2, item3 from Change Source in Query Editor.

 

Then you could create the matrix like this.

 

matrix.PNG

 

If I misunderstood your requirement, please share your desired output so that we could help further on it.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I thought about unpivot. But with unpivot, will there be no performance problem when the table can have more than a million rows again?
I would like to add a column of calculations to DAX and show them.
In addition, item1,item2,item3,item4,item5,item6,item7,and A,B,C,D,E are also fixed. It is estimated that there are about 300,000 categories.

And thank you very much for your answer.

Hi @Anonymous,

 

Yes, if we use unpivot it will produce more rows.

 

However, for your scenario, the large data source also will affect the performance when have calculation and filter.

 

If you have solved your problem, please accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

 

Best  Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors