Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Simple goal. Give me a list of account numbers that do not have an auto loan. An account can have many loans and a loan can belong to a single account. Here is the SQL I wrote to generate the list, but how could I do this in PowerBI?
SELECT account.ACCOUNTNUMBER, COUNT(loan.PARENTACCOUNT) AS 'AUTO_LOAN_COUNT'
FROM dbo.Lite_Accounts account
LEFT JOIN dbo.Lite_Loans loan ON loan.PARENTACCOUNT = account.ACCOUNTNUMBER AND loan.CLOSE_DATE AND loan.[TYPE] IN ('USED VEHICLE', 'NEW VEHICLE')
WHERE account.CLOSE_DATE IS NULL
GROUP BY account.ACCOUNTNUMBER
HAVING COUNT(loan.PARENTACCOUNT) = 0
Solved! Go to Solution.
@Neve12ende12 there are few ways to do this, add a measure and then use it for visual level filter or add a new column in account table and then filter on this column
Measure:
Measure Filter = IF ( CALCULATE ( COUNTROWS ( LoanTable ), LoanTable[Type] IN { "Old", "New" } ) == BLANK(), 1, 0 )
Use this measure as visual level filter where measure value is 1
Column
Loan Taken = CALCULATE ( COUNTROWS( LoanTable ), LoanTable[Type] IN { "Old", "New" } )
It will create count of loans in account table, and one which doesn't have loans, it will be blank, now you can filter on this column by saying where this column value is BLANK
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@Neve12ende12 there are few ways to do this, add a measure and then use it for visual level filter or add a new column in account table and then filter on this column
Measure:
Measure Filter = IF ( CALCULATE ( COUNTROWS ( LoanTable ), LoanTable[Type] IN { "Old", "New" } ) == BLANK(), 1, 0 )
Use this measure as visual level filter where measure value is 1
Column
Loan Taken = CALCULATE ( COUNTROWS( LoanTable ), LoanTable[Type] IN { "Old", "New" } )
It will create count of loans in account table, and one which doesn't have loans, it will be blank, now you can filter on this column by saying where this column value is BLANK
Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
123 | |
69 | |
67 | |
58 | |
52 |
User | Count |
---|---|
183 | |
92 | |
67 | |
62 | |
53 |