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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

@d_sandip59 ,

Refer the option you have incremental load

https://docs.microsoft.com/en-us/power-bi/service-premium-incremental-refresh

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.