cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Advocate III
Advocate III

DAX FORMAT() eating all my capacity memory

Hi,

 

I have a measure I'm using to switch between various measures for a matrix, using a drop down slicer

 

 

Selected KPI = 
    SWITCH(
        FIRSTNONBLANK('Dim Selected Measure'[Selected_Measure], 1),
            "Number of Sales", [Number of Sales],
            "Number of Products", [Number of Products],
            "Cost", FORMAT([Cost],"£#,##0")
        )

 

 

The last measure I want to format as a currency, so have used the FORMAT() function.

 

This works well for small datasets but as my data is rather big it runs out of memory. Is there a way for format the measure dynamically using another method? The Cost measure itself is formatted as a currency but the formatting gets lost when used as part of another measure.

 

The first two measures in the list work perfectly, so it is definitly the FORMAT() function eating all the memory in my Power BI capacity.

 

Any help or advice appreciated.

Many Thanks

2 REPLIES 2
Community Support
Community Support

Hi @dom99 ,

 

I am afraid that Power BI doesn't support it currently. You could vote for these ideas to improve Power BI and make the feature coming sooner.

https://ideas.powerbi.com/ideas/idea/?ideaid=e43536bc-a67a-4462-8f9a-197074a669ee

https://ideas.powerbi.com/ideas/idea/?ideaid=5682bf97-fa54-4530-b616-84307186819c

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Super User IV
Super User IV

@dom99 , as of now dynamic formatting of measure if not available.

 

Try the code in this -https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

 

Avoid first non blank and see



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

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 Solution Authors
Top Kudoed Authors