Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Please kindly help LOD Tableau in Nested Ifs DAX or something else?

Hi all,

I am hoping to get some guidance/solution from you as I could have it done previously in Tableau but I am not sure how to do this in Power Bi which is the current platform we are using at work.

Below is a mock data of the card transactions that our credit cardholders spent last month. I would like to filter on Transactions/cardholders based on Transaction ID who incurred Split Transactions. Split transactions are those if it meets both the following 2 business rules:

1. A transaction is part of the split transactions when the transactions have the same cardholder, same transaction date, same merchant AND

2. The total transaction amount of this split transactionS exceed the transaction limit.

 

In the below example, Amy H, John L and Sue A are the people who incurred split transactions.

-For Amy H, transaction ID 001,004,007 have the same cardholder, same transaction date, same merchant and the total transaction incurred in Bunning 2023 is $1900 ($1000+$400+$500) which is higher than her transaction limit of $500

-For John L, transaction 002 and 009 have the same cardholder, same transaction date, same merchant and the total transaction incurred in KFC Newington is $330 which is higher than her transaction limit of $100

-For Sue A, transaction 014 and 015 have the same cardholder, same transaction date, same merchant and the total transaction incurred in Michael Hill Jewellery is $1000 which is higher than her transaction limit of $500

 

There are other cardholder who met the 1st rule but not the 2nd rule where the total transactions is less than their transaction limit so they are fine.

 

I reallly appreciate if any of you can share your valuable experience with me in getting this solved. Thanks a million times.

 

Transaction IDCardholderCard NumberTransaction LimitTransaction Date Merchant Name Amount 
001Amy Hxxxx12350011/12/2020Bunning 2023        1,000
002John Lxxxx25610011/12/2020KFC Newington           250
003Christine Fxxxx38910011/12/2020Office work 2000             80
004Amy Hxxxx12350011/12/2020Bunning 2023           400
005Amy Hxxxx12350011/12/2020Thai Restaurant Marricville           600
006Frances Fxxxx788100011/12/2020Paypal Reading ABC           800
007Amy Hxxxx12350011/12/2020Bunning 2023           500
008Morris Mxxxx105410011/12/2020Children Accessories             50
009John Lxxxx25610011/12/2020KFC Newington             80
010Christine Fxxxx38910011/12/2020Coles Newmarket             50
011Frances Fxxxx788100012/12/2020Apple Shop 2560           500
012Sabrina Lxxxx158610012/12/2020Camping Shop 9999           100
013Macdona Nxxxx171910012/12/2020Shoesbox Carington             80
014Sue Axxxx185250012/12/2020Michael Hill Jewels           600
015Sue Axxxx185250012/12/2020Michael Hill Jewels           400
016Amy Hxxxx12350012/12/2020Woolworth Stafford           200
017John Lxxxx25610012/12/2020Aircon Repair Service             60
018Sammie Fxxxx238410012/12/2020The GoodGuy Evermore             67
019Ron Mxxxx251710012/12/2020Café Local             20
020Frances Fxxxx788100012/12/2020Apple Shop 2560           200
021Nicole Nxxxx278310012/12/2020Café Local             30
022Jasmine Lxxxx291610012/12/2020Camping Shop 9999             40
023Margaret Mxxxx304910013/12/2020office work windsor             99
024Sue Axxxx185250013/12/2020curtain home corner           450
025Ron Mxxxx251710013/12/2020jewlels repair Amazon                6
026Leon Sxxxx344810013/12/2020Bakery community             66
027Amy Hxxxx12350013/12/2020Officework Westsryde             22
028Morris Mxxxx105410013/12/2020Children Accessories             99
029Susan Zxxxx384720013/12/2020Au Post service           160
030Susan Zxxxx384720013/12/2020Sushi Corner             36
2 REPLIES 2
lbendlin
Super User
Super User

you don't need nested IFs for that. Use the "&&" (and)  and "||" (or) operators as needed.

 

Having said that, the first part of your problem is more one of grouping, rather than logic checks. After the grouping, do a SUMX on the result and then check if the SUMX exceeds the threshold.

Anonymous
Not applicable

Hi 

Thanks for the reply, can you please explain a bit more. I m not sure how to compared transactions for instance, how to do "if transaction 001,004,007 is part of the split transaction because the cardholder is the same person, same merchant and same day??

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.