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

Last row of record to show product final balance

Hi All,

 

I trying to have a table that show those product that does not have transaction in last 6 months but there still store balance.

I create 2 measurement to achieve this:

 

1. Transaction count

 

Transactions =
IF ( ISBLANK ( [count of transactions] ), 0, [count of transactions] )

 

After that will only view those with 0.

 

 

2. product balance

 

LastBal = SUMX (
bi_product_master,
CALCULATE (
SUM ( bi_bill[ProductBal] ),
LASTNONBLANK ( bi_bill[DocDate], CALCULATE ( COUNTROWS ( bi_bill) ) )
)
)

 

However, i faced problem on 2nd measure due to i am using a date slicer to show those product with zero transaction count in 1st measure. Those product have balance before 6 months ago would not shown in table. May i know how to make the 2nd measure ignore the date slicer or always calculate the ALL(bi_bill). Or any alternative measure to fulfill the requirement that always show last row by date of that product balance.

 

Thanks.

2 REPLIES 2
ChandeepChhabra
Impactful Individual
Impactful Individual

Hi @eddiechang,

 

Can you share your pbix file ?

Hi @ChandeepChhabra,

 

Thanks for your reply and help offer. pbix here. balance.pbix

 

Actually there are 2 outcome i wish to have.

 

1. last row as balance, across whole table without date filter/ slicer filter. For now the product will not show due to there only have transaction within last 6 months.

 missing if no trans.PNG

 

2. Store balance by month. If there no transaction for that particular month, it will not show. Perhaps it can take previous month non blank row, if my logic is not wrong.

take previous month bal.PNG

 

Thanks again.

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.