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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
affan
Solution Sage
Solution Sage

Value not in current period but in last period - rows are hidden

Hi,

 

I am working on a report where I am having a comparison of current year's production quantity and last year production quantity. 

 

I have three columns
1. Material

2. Quantity

3. Date

 

I am making a comparison of items using the simple measure

 

Current Qty= SUM('Table1'[Quantity])

For last year 

CALCULATE([Current Qty],SAMEPERIODLASTYEAR('Date'[Date])

 

The issue I am facing is when I have an item produced in last but it is not in the current year, the row is not shown in the data.

 

I have tried show items with no data on the 'Material' field. It does not help as it starts showing the items even with no values in both periods.

 

Thanking for any help in advance 🙂

 

Regards,

Affan

1 ACCEPTED SOLUTION
affan
Solution Sage
Solution Sage

I have reached to the solution by using the ISBLANK function.

 

I have updated my current period quantity formula as below.

 

 

Quantity = var qty=CALCULATE([Current Qty],SAMEPERIODLASTYEAR('Date'[Date])

return
 IF(ISBLANK(qty),0,qty)

 

 

 

View solution in original post

3 REPLIES 3
affan
Solution Sage
Solution Sage

I have reached to the solution by using the ISBLANK function.

 

I have updated my current period quantity formula as below.

 

 

Quantity = var qty=CALCULATE([Current Qty],SAMEPERIODLASTYEAR('Date'[Date])

return
 IF(ISBLANK(qty),0,qty)

 

 

 

v-lili6-msft
Community Support
Community Support

hi, @affan

     I have tested on my side, but not reproduce the issue.

For example:

there is production on 2017/11 and 2017/12 and there is no production on 2018/11 and 2018/12, it works well.

 

5.PNG

Please share your sample pbix and expected output. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.

 

 

Best Regards,

Lin

 

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

Hi @v-lili6-msft,

 

Thanks for your response. The issue is when I add the Material, Quantity and Quantity LY to a table visual. It filters out those items which have no transaction in the current period. The example you have shown is a bit different.

 

Regards,

Affan

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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