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
rhl94
Advocate III
Advocate III

Recreating the following excel table(s)

Hi

 

I am looking to create a similiar table to what we currently has in excel:Unavngivet.png

So far we have the data available in Power BI, but structured differently. This is how the table is structured in Power BI:

 

Unavngivet2.png

 

It is easy to re-create the table on the left as a matrix visual, however I need to perform calculations based on the table, so that wont work. I've tried to create a calculated table that is summarized as such;

 

Table =
SUMMARIZECOLUMNS (
    [Town];
    "Network1"; CALCULATE (
        DISTINCTCOUNT ( [Number]);
        [Network] = "Network1"
    );
    "Network2"; CALCULATE (
        DISTINCTCOUNT ( [number] );
        [Network] = "Network1"
    );
    "Number"; DISTINCTCOUNT ( [Number] )
)

 

, however I need to filter date(which I didnt include in the mockup) and a few other things, and that doesn't work with the filter.

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @rhl94 ,

You can try this:

1. In Power Query Editor, Pivot column 'Network'.

pivot.jpgpivot2.PNG

2. Create measures.

Total Number = SUM ( 'Table'[Network1] ) + SUM ( 'Table'[Network2] )
Network1 % = DIVIDE ( SUM ( 'Table'[Network1] ), [Total Number] )
Network2 % = DIVIDE ( SUM ( 'Table'[Network2] ), [Total Number] )
Total Percent = [Network1 %] + [Network2 %]

pivot3.PNG

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @rhl94 ,

You can try this:

1. In Power Query Editor, Pivot column 'Network'.

pivot.jpgpivot2.PNG

2. Create measures.

Total Number = SUM ( 'Table'[Network1] ) + SUM ( 'Table'[Network2] )
Network1 % = DIVIDE ( SUM ( 'Table'[Network1] ), [Total Number] )
Network2 % = DIVIDE ( SUM ( 'Table'[Network2] ), [Total Number] )
Total Percent = [Network1 %] + [Network2 %]

pivot3.PNG

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Icey and thank you for your answer

 

The problem is - and I should probably have included that in the last table in my post - I have a date column and a category column (what category is the number from) that I would like to filter upon in my report. When I pivot the table like you suggested, I lose the possibility of filtering them by date and category. 

 

For example, I would only like to a report of numbers from 2019 and of the type "fruit" for example.

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.