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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
czetsuya
New Member

How to create a Treemap using the last value of a column

Hi,

 

I'm customizing a Treemap visual for my crypto trading analysis. I'm using the ticker name as the main category and rsi "average" as the values.

 

My problem is that RSI is using the average, my requirement is to use the latest value stored in the column but there is nothing like "use last value" in the dropdown. How can I achieve it?

 

czetsuya_0-1677909861284.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @czetsuya ,

You can create a measure as below and replace the average of field [rsi] to put this measure onto the treepmap visual...

Measure =
VAR _selticker =
    SELECTEDVALUE ( 'Table'[ticker] )
VAR _maxdate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[ticker] = _selticker )
    )
RETURN
    CALCULATE (
        MAX ( 'Table'[rsi] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[ticker] = _selticker
                && 'Table'[Date] = _maxdate
        )
    )

If the above one can't help you, please provide some raw data in your table (exclude sensitive data) with Text format, your treemap Fields settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @czetsuya ,

You can create a measure as below and replace the average of field [rsi] to put this measure onto the treepmap visual...

Measure =
VAR _selticker =
    SELECTEDVALUE ( 'Table'[ticker] )
VAR _maxdate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), 'Table'[ticker] = _selticker )
    )
RETURN
    CALCULATE (
        MAX ( 'Table'[rsi] ),
        FILTER (
            ALLSELECTED ( 'Table' ),
            'Table'[ticker] = _selticker
                && 'Table'[Date] = _maxdate
        )
    )

If the above one can't help you, please provide some raw data in your table (exclude sensitive data) with Text format, your treemap Fields settings and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Thanks. Your solution works for me.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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