cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper IV
Helper IV

performance issue with measure

Hi,

I have the following measure(Actual) which when sliced by fields from Empl dim consumes lot of memory and visual takes a lot of time to load.When no slicer is selected,visual crashes with error.How can i optimize it.

Actual=SUMX('Empl Dim',DIVIDE([USDCost],[HC],BLANK()))

 

USDCost = CALCULATE(sum(Budget[PerHead])*[HC])

HC = CALCULATE(DISTINCTCOUNT('Usage'[Username]),HeadCnt[Flag]=TRUE())
2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: performance issue with measure

@pBI1234 - I have a series on DAX performance tuning: 

https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-1/ba-p/976275

https://community.powerbi.com/t5/Community-Blog/Performance-Tuning-DAX-Part-2/ba-p/976813

 

Could maybe be DISTINCTCOUNT, perhaps try changing that to COUNTROWS just to test. Otherwise, could be your SUMX since it iterates over all rows in the table.

 

Otherwise, difficult to say without something to test with.

 


---------------------------------------

@ me in replies or I'll lose your thread!!!

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Helper IV
Helper IV

Re: performance issue with measure

Usage table contains user,application combination and countrows will simply count all rows.I need unique count of usernames

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Upcoming Events

Experience what’s next for Power BI

See the latest Power BI innovations, updates, and demos from the Microsoft Business Applications Launch Event.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Kudoed Authors