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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
NavaneethaRaju
Helper IV
Helper IV

How to show only max day on report

Hi,

 

I created a calculcated column to find the difference, like last used.

 

Days= DATEDIFF('Sales Fact'[Date(DD/MM/YYYY)],TODAY(),DAY)

NavaneethaRaju_0-1656943470277.png


I want to display the marked data alone, like max days only. 

 

i want to omit remainig days. respective of tag id, i need to show last days used.
Tag ID= tag_usage_fact(Table)

Set ID= SET DIM(Table)
Set Name= SET DIM(Table)
Order Date= Sales Table



in this calculated column i donno how to filter only max.

 

Please advice i have to create any measure to manipulate the data.

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @NavaneethaRaju 

 

Please try the following methods.

Measure =
IF (
    SELECTEDVALUE ( 'Table'[Days Not Used] )
        = CALCULATE (
            MAX ( 'Table'[Days Not Used] ),
            FILTER ( ALL ( 'Table' ), [Tag ID] = SELECTEDVALUE ( 'Table'[Tag ID] ) )
        ),
    1,
    0
)

Put Measure into Filters and set it to equal 1.

vzhangti_0-1657165289059.png

vzhangti_1-1657165303035.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more.

 

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @NavaneethaRaju 

 

Please try the following methods.

Measure =
IF (
    SELECTEDVALUE ( 'Table'[Days Not Used] )
        = CALCULATE (
            MAX ( 'Table'[Days Not Used] ),
            FILTER ( ALL ( 'Table' ), [Tag ID] = SELECTEDVALUE ( 'Table'[Tag ID] ) )
        ),
    1,
    0
)

Put Measure into Filters and set it to equal 1.

vzhangti_0-1657165289059.png

vzhangti_1-1657165303035.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more.

 

tamerj1
Super User
Super User

@NavaneethaRaju 

Please try this measure

Days =
VAR CurrentDate =
    MAX ( 'Sales Fact'[Date(DD/MM/YYYY)] )
VAR MinDate =
    CALCULATE (
        MIN ( 'Sales Fact'[Date(DD/MM/YYYY)] ),
        ALLEXCEPT ( 'Sales Fact', 'Sales Fact'[Tag ID] )
    )
RETURN
    IF ( CurrentDate = MinDate, DATEDIFF ( MinDate, TODAY (), DAY ) )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.