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
Anonymous
Not applicable

Working with timeline and measures

Hi to everyone!

 

I'm kind off stuck with some measures.

 

In my model I have two facts tables (SALES and SALES IMS) and one period table (PERIOD). The period table is made with the dates of SALES witch is always up to date. SALES IMS is always two or three months begind.

 

So, I'm making a report that contains a table visual for showing sales from both tables and a time slicer with the dates in PERIOD. If in the time slicer I select jan-2017 to jun-2017 the measures of SALES will return the sales of that period. In the case of the measures from SALES IMS, they will return sales from jan-2017 to apr-2017, since apr-2017 is the last day with values. So far, this is not a problem. The problem is when I select only jun-2017, the measures from SALES will return data from that specific month, but in the case of SALES IMS will be blank. What I need is measures from SALES IMS return data from the last date with values, in case that there is no data in the selected period. I need the same for previous year sales.

 

Hope I'm clear.

 

I will appreciate your help.

 

Thanks in advance.

 

Regards.

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Could you please post a sample with measures here? Maybe you could do it yourself. It's something like this:

Sales IMS =
VAR sales = [your old measure]
RETURN
    IF (
        ISBLANK ( sales ),
        CALCULATE ( [your old measure], SAMEPERIODLASTYEAR ( period[date] ) ),
        sales
    )

The table "period" should contain continuous dates.

 

Best Regards!

Dale 

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-jiascu-msft

 

Thanks for your reply and help.

 

I've tried a measure like that before and didn't work. Anyway, after hours of thinking and work, I was able to work it out. The result is a measure that copied to Word fits in 10 pages. Yes! 10 pages!

 

The total scenary is so complex that I wouldn't know where to start explaining it.

 

Thanks for everything.

 

Have a great 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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.