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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
GunnerJ
Post Patron
Post Patron

Improving efficiency of a large measure

I have two measures that have to go through several "IF" statements to know which measure to use. They then use SUMX to get a grand total but as you can see below the dashboard actually just times out. My request to the community is to provide a more effecient way to get these grand totals or to limit the data. At the moment I'm a bit stuck on this issue.

GunnerJ_0-1666635896658.png

Summed Monthly Econ Benefit = 
   SUMX('Campaign Member', CALCULATE(
    if(SELECTEDVALUE(Campaign[Campaign_Reason__c]) = "Cross sell – Upgrade Internet", [Total Charges],
       IF( SELECTEDVALUE(Campaign[Campaign_Reason__c]) = "Cross sell – Paperless", 'Paperless Updates'[$ Monthly Paperless Benefit],
       IF(SELECTEDVALUE(Campaign[Campaign_Reason__c]) = "Cross sell – Bank Draft", [$ Monthly Bank Draft Benefit],
       IF(SELECTEDVALUE(Campaign[Campaign_Reason__c]) = "Acquisition – Residential", [Total First Go Charges],
       IF( SELECTEDVALUE(Campaign[Campaign_Reason__c]) = "Cross sell – EV Rate", [Monthly EV Benefit],
       IF(SELECTEDVALUE(Campaign[Campaign_Reason__c]) = "Cross sell – TOU rate", [Monthly TOU Benefit],
       "")
       ))))),
       FILTER(Campaign,
               Campaign[StartDate] >= DATE(2021, 7,29)
   )))

 

https://www.dropbox.com/s/akexa9amyqb6e6z/Marketing%20Campaigns%20Dashboard.pbix?dl=0

4 REPLIES 4
aj1973
Community Champion
Community Champion

Hi @GunnerJ 

aj1973_0-1666636622203.png

Add Variable to you measure

 

In another context, your model is way from being the best you can optimise, you need to better optimise it.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

@aj1973 thank you for the quick reply. With the variable I can only get a value to show if I select a single campaign. You are absolutely correct it needs to be optimized more and I was simply hoping to be fortunante that someone would see a "quick" fix to help improve overall performance. 

aj1973
Community Champion
Community Champion

It's normal to get values for the selected campaign because you're using SELECTEDVALUE in your measure.

To optimize your model it would need more than a quick fix on the fly, sorry 😔

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Thank you for the quick reply! I will continue to see if there's any way to choose between different measures to try and speed things up but I do appreciate the effort to help!

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors