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
Ormy28
Regular Visitor

Matrix Visual - Attributes on Different Rows

Hi

 

I have a table of transactions that includes a Start Date along with two attributes, Transaction Type and Fulfilled.

 

Transaction Type is simply a three letter code and Fulfilled is just a 1 or 0.

 

Start DateTransaction Type     Fulfilled
31/03/2025     ARY0
31/03/2025     ARY1
31/03/2025     QXN1
31/03/2025     TRP0
07/04/2025     QXN0
07/04/2025     QXN1
07/04/2025     TRP1
07/04/2025     TRP1
07/04/2025     TRP0
07/04/2025     QXN1
07/04/2025     TRP0

 

I want to create a matrix visual with the Start Date as columns, and both the Transaction Type and Fulfilled as rows. The values would then just be the count of each Transaction Type and the count of 1s for Fulfilled:

 31/03/2025     07/04/2025
ARY     20
QXN     13
TRP     14
Fulfilled     24

 

The solution would also need to take into account that new Transaction Types can be added as time goes by, and these would need to be added to the matrix. Therefore, I ideally would like to avoid a situation where I had to update DAX with a new Transaction Type.

 

Totally at a loss as to how to acheive what I thought would be quite simple!

 

1 ACCEPTED SOLUTION
v-venuppu
Community Support
Community Support

Hi @Ormy28 ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Regards,

Rama U.

View solution in original post

4 REPLIES 4
v-venuppu
Community Support
Community Support

Hi @Ormy28 ,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Regards,

Rama U.

Cookistador
Super User
Super User

This is how I set up the matrix:

Cookistador_0-1744719940972.png

 

 

The measure is a values if I add a new Transaction type, it will be added automatically 

 

Cookistador_1-1744720017826.png

 

Cookistador
Super User
Super User

Hi @Ormy28 

The following dax measure should help you

Total =
VAR CountValue = CALCULATE(COUNT('Table'[Transaction Type]))+0
RETURN
IF(
        ISINSCOPE('Table'[Transaction Type]),
            CountValue,
            CALCULATE(COUNT('Table'[Fulfilled]),'Table'[Fulfilled] = 1)
)
Cookistador_0-1744717584250.png

 

 

Thanks for your reply.

 

How would you then use this measure? I was of the understanding that measures could not be used as rows in a matrix visual?

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.