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

Need "Total Loans" as additional Column in Matrix visualization "Exception to Guidelines"

Hello -

 

Req. screenshot to add Total Loans:-

kaumil2001_0-1634102182507.png

 

SQL code for each month values are here:-

SELECT CAST(DATEADD(m, DATEDIFF(m, 0, loandim.[booking_dt]), 0) AS date) AS [booking_dt], COUNT(*) AS [Loans] FROM [dbo].[loan_account_dim] AS loandim INNER JOIN [dbo].[application_dim] AS appdim ON appdim.[id] = loandim.[application_id] GROUP BY CAST(DATEADD(m, DATEDIFF(m, 0, loandim.[booking_dt]), 0) AS date) ORDER BY CAST(DATEADD(m, DATEDIFF(m, 0, loandim.[booking_dt]), 0) AS date)

 

Above query values are here:-

kaumil2001_1-1634102473482.png

 

 

 

Thank You

gk03

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @kaumil2001 

Didn't you already get the results, I see total in the pbix file you provided, at the bottom.

 

I'm not sure if I'm understanding you correctly.

vchenwuzmsft_0-1634284512060.png

 

I put the pbix file in the end you can reference.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

5 REPLIES 5
v-chenwuz-msft
Community Support
Community Support

Hi @kaumil2001 

Didn't you already get the results, I see total in the pbix file you provided, at the bottom.

 

I'm not sure if I'm understanding you correctly.

vchenwuzmsft_0-1634284512060.png

 

I put the pbix file in the end you can reference.

 

Best Regards

Community Support Team _ chenwu zhu

 

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

kaumil2001
Regular Visitor

@kaumil2001 , I doubt you can get the display you want. There is an option - Show on row. That move measures on row. But this is different from that

 

We usually use a hybrid table workaround. But  I doubt in this case

 

if you are looking for a Hybrid display with Matrix Column and measure
https://community.powerbi.com/t5/Community-Blog/Creating-a-custom-or-hybrid-matrix-in-PowerBI/ba-p/1...
https://community.powerbi.com/t5/Quick-Measures-Gallery/The-New-Hotness-Custom-Matrix-Hierarchy/m-p/...

vote for Hybrid Table
https://ideas.powerbi.com/ideas/idea/?ideaid=9bc32b23-1eb1-4e74-8b34-349887b37ebc

@amitchandak 

I'm able to display "Total Loans" in the .pbix file below but I'm not sure how to display the values correctly,

kaumil2001_2-1634188688921.png

Values I'm looking are from the below SQL query:-
SELECT CAST(DATEADD(m, DATEDIFF(m, 0, loandim.[booking_dt]), 0) AS date) AS [booking_dt],
COUNT(*) AS [Loans]
FROM [dbo].[loan_account_dim] AS loandim
INNER JOIN [dbo].[application_dim] AS appdim ON appdim.[id] = loandim.[application_id]
GROUP BY CAST(DATEADD(m, DATEDIFF(m, 0, loandim.[booking_dt]), 0) AS date)
ORDER BY CAST(DATEADD(m, DATEDIFF(m, 0, loandim.[booking_dt]), 0) AS date)

kaumil2001_1-1634188610191.png


Once correct Total Loans values are displayed I need to use as denomater for the % column in the above screenshot, eg. for Aug 2020 month for "FICO < Min Required" % column will be 26/29 = 89.66%

Hope it makes sense, let me know how to achieve it?

Hello again,

 

kaumil2001_0-1634195339023.png

 

1. Based on my above SQL query, I was trying to display 29 & 33 for Total Rows Matrix Column for Aug 2020 & Sep 2020 month.

 

2. Also, I was trying display % Matrix Values by calulation as # / Total Loans for all the exception rules.

 

Thanks in advance

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.