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
Anonymous
Not applicable

Power BI : Dynamic aggregations and Drillthrough

Hi, I have a specific requirement where from single transaction table I have to develop 3 hierarchical/drillthrough reports.

Below are my input tables.

Input.PNG

 

 

 

 

 

 

And below are my 3 reports format.

1st one is at 'Group' Level

Report1.PNG




2nd is at 'Buyer' level which is a drill through from above report

Report2.PNG






The 3rd is at 'Loan' level which is a drill through from above report

Report3.PNG


My main problem areas are on the fly calculation of 'Balance' and 'Status' column. Which by nature are categorical but needs to be calculated via a measure (hence dynamic in nature).
One approach I had thought of was while fetching the data only do Group level and Buyer level aggregations but data is huge and the field 'Utilization' itself is a calculated field I have generated inside Power BI.

Please help me how to achieve above reports.

Please let me know if more info is required for the problem. @Greg_Deckler  @v-zhenbw-msft

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

if(calculate(sum(Transaction[Buyer Utilization]),allexcept(Transaction[Buyer])) - max(Entity[Single group Utilization])<0, "Breached", "Non Breached")

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , Try like

if(calculate(sum(Transaction[Buyer Utilization]),allexcept(Transaction[Buyer])) - max(Entity[Single group Utilization])<0, "Breached", "Non Breached")

Anonymous
Not applicable

Hi @amitchandak , the calculate function part is giving me the proper sum of utilization, BUT the MAX part is always giving the Maximum Limit from that Table irrespective of the Entity. I need Max Limit for that particular Entity. I tweaked your formula to Calculate(Max(Limit), ALLEXCEPT(Table, Entity)), but still it gives me overall Max of Limit irrespective of Entity. 

 

Below is the snapshot of my Entity Master table from where Entity Limit needs to be pulled. Can you please help me with it.

sahildoshi_0-1594529380785.png

 

Hi @Anonymous,

You a refer to the following link to know to how to check current row content and write a format to extract current category as a parameter to calculate on the total level:

Clever Hierarchy Handling in DAX 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.