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
dom99
Advocate V
Advocate V

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
v-eachen-msft
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.
amitchandak
Super User
Super User

@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

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.