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
d_sandip59
Helper I
Helper I

How to load data in a table based on Max date for the first time

Hi,

I want to load data in a table based on Max date for the first time when the report will load, but if user choose another date from date slicer it will load data accordingly. So if user deselect all the dates from the slicer it will load again data based on Max date available in the table.
 
So by default it will load data based on Max date in the table, and based on the user selection will change and if user clears the selected date value , it will again load data based on Max date.
 
Can I achieve that?
1 ACCEPTED SOLUTION

Hi @d_sandip59 ,

Based on your previously measure, you can create a new table to extract date first:

Table = DISTINCT('EDG_COUNT_STATUS'[Date])

Then try to create this measure:

Date filter = 
VAR _date =
    SELECTEDVALUE ( EDG_COUNT_STATUS[Date] )
RETURN
    IF (
        NOT ( ISFILTERED ( 'Table'[Date] ) ),
        [MaxDateFilter],
        IF ( _date IN FILTERS ( 'Table'[Date] ), 1, 0 )
    )

 You can put this measure in the visual filter of table to solve this case:

default date valuedefault date valueafter choosing date manuallyafter choosing date manually

Here is the demo, please try it:

PBIX 

 

Best Regards,
Yingjie Li

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

View solution in original post

7 REPLIES 7
amitchandak
Super User
Super User

Hi,

I want to show data at Table chart, but not to load them in a incremental load way. I think you misunderstood me.

 

There are a few ways. Create your calendar table till the max date. And the filter for day .

Create a filter of yes and no in the calendar table based on max date of data and use that filter

Or create a measure like this

Measure =
var _min = maxx(Table,table[date])
return
calculate(count(Table[ID]), filter(table,table[Due_dates]=_max))

Refer

https://www.youtube.com/watch?v=c_MjL1Cngbs

Hi,

I am working on the issue and have create a calculated column on the below dax:

MaxDateFilter = 

var vMaxLoadDate = CALCULATE ( MAX ( EDG_COUNT_STATUS[Date] ), ALL ( 'EDG_COUNT_STATUS' ) ))
return IF( MIN(EDG_COUNT_STATUS[Date]) = vMaxLoadDate ,1,0)

and make MaxDateFilter =1 only.

but doing that it only loads data based on max date only at the table. But now if I choose different date from the filter it does not load data at the table based on the selected date.

 

So any suggestion on that?

 

Hi @d_sandip59 ,

Based on your previously measure, you can create a new table to extract date first:

Table = DISTINCT('EDG_COUNT_STATUS'[Date])

Then try to create this measure:

Date filter = 
VAR _date =
    SELECTEDVALUE ( EDG_COUNT_STATUS[Date] )
RETURN
    IF (
        NOT ( ISFILTERED ( 'Table'[Date] ) ),
        [MaxDateFilter],
        IF ( _date IN FILTERS ( 'Table'[Date] ), 1, 0 )
    )

 You can put this measure in the visual filter of table to solve this case:

default date valuedefault date valueafter choosing date manuallyafter choosing date manually

Here is the demo, please try it:

PBIX 

 

Best Regards,
Yingjie Li

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

Hi,

Thank you very much for your help. It really wroks.

 

Thanks,

Sandip

Hi,

My pleasure🙂

 

Best Regards,

Yingjie Li

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.