cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
DataSpace
Frequent Visitor

Need to add extra column in existing Power BI matrix visual

I can not post customer data , hence tried to create exact scenario here.

I have to create a PBI report with Matrix visual which (later) supports DrillThrough action.

Below is what I want to achieve:

 

DrillThough Query1.png

I tried to create dataset(below) to support above report only for row no 1 and 5.

 

DrillthoughDataSet.png

in report above, I am able to achieve till column H, where it is showing count of Brands sold.

But irrespective of Brand sold , requirement is also to include count of "in-progress" status just like it is shown column I (In-Progress column). And this is where I am struggling.

I tried creating measure and calculated column to count "in-progress" status separately and then drag it to values Or then Columns, Both are not working and giving weird result.

Any help/comment is appreciated. OR is there any other way to achieve it like with Table visuals considering drillthough should not break?

thanks

2 ACCEPTED SOLUTIONS
KNP
Super User
Super User

Hey @DataSpace,

 

Difficult if not impossible to achieve in the standard matrix. 

I've done what I think you're after in a table. See attached PBIX.

Note: could probably be done cleaner with Calculation Groups but I'm time-poor.

 

If you've got the November release of Power BI Desktop, you can just post the below into the DAX query view and change table/column names as required and add measures from there.

DEFINE
    MEASURE 'Transportation'[In-progress] = CALCULATE (
    COUNTA ( 'Transportation'[Status] ),
    'Transportation'[Status] = "In-progress",
    REMOVEFILTERS ( Transportation[Brand Sold] )
)
    MEASURE 'Transportation'[BMW] = CALCULATE (
    COUNTA ( Transportation[Status] ),
    Transportation[Brand Sold] = "BMW"
)
    MEASURE 'Transportation'[Suzuki] = CALCULATE (
    COUNTA ( Transportation[Status] ),
    Transportation[Brand Sold] = "Suzuki"
)
    MEASURE 'Transportation'[Honda] = CALCULATE (
    COUNTA ( Transportation[Status] ),
    Transportation[Brand Sold] = "Honda"
)
    MEASURE 'Transportation'[Yamaha] = CALCULATE (
    COUNTA ( Transportation[Status] ),
    Transportation[Brand Sold] = "Yamaha"
)

EVALUATE
    SUMMARIZECOLUMNS(
		Transportation[Product Category],
		Transportation[Product Sub Category],
        "BMW", 'Transportation'[BMW],
        "Suzuki", 'Transportation'[Suzuki],
        "Honda", 'Transportation'[Honda],
        "Yamaha", 'Transportation'[Yamaha],
        "In-progress", 'Transportation'[In-progress]
    )

Hope this helps.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x

View solution in original post

danextian
Super User
Super User

Hi @DataSpace ,

 

If you want an extra column in your matrix, you will need to make that extra column exist using a disconnected table which will hold brands as well as another row  for in-progress then use create measure to return your desired value. Please see attached pbix for details.

 

danextian_0-1700556424141.png

 

 






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

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.
Learn with me on YouTube @PowerBITambayan.

View solution in original post

4 REPLIES 4
DataSpace
Frequent Visitor

Thanks both of you @danextian  and @KNP  for your quick reply.

Let me please check and implement the solution.

Thanks Again

danextian
Super User
Super User

Hi @DataSpace ,

 

If you want an extra column in your matrix, you will need to make that extra column exist using a disconnected table which will hold brands as well as another row  for in-progress then use create measure to return your desired value. Please see attached pbix for details.

 

danextian_0-1700556424141.png

 

 






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

Proud to be a Super User!




"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Connect to me on LinkedIn || Need consulting? Hire me for a Power BI gig on UpWork.
Learn with me on YouTube @PowerBITambayan.
KNP
Super User
Super User

Hey @DataSpace,

 

Difficult if not impossible to achieve in the standard matrix. 

I've done what I think you're after in a table. See attached PBIX.

Note: could probably be done cleaner with Calculation Groups but I'm time-poor.

 

If you've got the November release of Power BI Desktop, you can just post the below into the DAX query view and change table/column names as required and add measures from there.

DEFINE
    MEASURE 'Transportation'[In-progress] = CALCULATE (
    COUNTA ( 'Transportation'[Status] ),
    'Transportation'[Status] = "In-progress",
    REMOVEFILTERS ( Transportation[Brand Sold] )
)
    MEASURE 'Transportation'[BMW] = CALCULATE (
    COUNTA ( Transportation[Status] ),
    Transportation[Brand Sold] = "BMW"
)
    MEASURE 'Transportation'[Suzuki] = CALCULATE (
    COUNTA ( Transportation[Status] ),
    Transportation[Brand Sold] = "Suzuki"
)
    MEASURE 'Transportation'[Honda] = CALCULATE (
    COUNTA ( Transportation[Status] ),
    Transportation[Brand Sold] = "Honda"
)
    MEASURE 'Transportation'[Yamaha] = CALCULATE (
    COUNTA ( Transportation[Status] ),
    Transportation[Brand Sold] = "Yamaha"
)

EVALUATE
    SUMMARIZECOLUMNS(
		Transportation[Product Category],
		Transportation[Product Sub Category],
        "BMW", 'Transportation'[BMW],
        "Suzuki", 'Transportation'[Suzuki],
        "Honda", 'Transportation'[Honda],
        "Yamaha", 'Transportation'[Yamaha],
        "In-progress", 'Transportation'[In-progress]
    )

Hope this helps.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
DataSpace
Frequent Visitor

Hi @KNP , your solution also works but to make the drill through work perfectly, I will have to add all the created measures in detailed table  and these measures should not be visible to end user.

And in the solution from @danextian , I only need to add one measure which can be hidden by reducing the width size.
Thanks both of you for quick support.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors