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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
insandur
Helper II
Helper II

Measure not working when using in table when other columns added in the table and applied filters

Hi Experts ,

 

I have table with multiple columns and using measure to get previous month value for selected month "Prev month Qty"

 

insandur_0-1731388654249.png

Now this measure doesnot work in the table when i add few more columns to the table, when i remove effected column, measure works. Also same with filter, when filter is applied meaure value dont work.

below is the effected column snapshot and green marked is the measure which is not working.

insandur_1-1731388872711.png

 

Thank you in advance.


6 REPLIES 6
Anonymous
Not applicable

Hi,

Thanks for the solution Uzi2019 offered, and i want to offer some more information for user to refer to.

hello @insandur , you can try the following code.

Pre month N2 to N7 =
CALCULATE (
    SUM ( 'FC Data'[N2 to N7 Avg] ),
    ALLSELECTED ( 'FC Data' ),
    EOMONTH ( 'FC Data'[FC Month], 0 ) = EOMONTH ( MAX ( 'FC Data'[FC Month] ), -1 )
)

Best Regards!

Yolo Zhu

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

 

Thank You Yolo,

i tried above method, even this is giving me blank values when i apply filter 'Approval Status' column. I get correct numbers when no filter is applied. Attaching the BI sample file.

 insandur_0-1731584150292.png 

 

after the filter

insandur_1-1731584220072.png

 




Anonymous
Not applicable

Hi @insandur 

Thank you for your quick reply. Could you provide some sample data? Because I cannot create some sample data according to your description, so I can't provide you with more suggestions and solutions.

 

Best Regards!

Yolo Zhu

Uzi2019
Super User
Super User

Hi @insandur 

 

Try this measure for previous monh calcuation

 

PrevMonth= Calculate(Sum(sales), DateAdd( 'Calendar'[Date], -1, Month))
Or

Prev Month= Calcuate ( Sum( Sales), ParallelPeriod( 'Calendar'[Date],-1, Month))

 

I hope I answered your question!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Thank you Uzi,

 

I just get total value, and blank rows when i try above method.

insandur_0-1731392402732.png

 

HI @insandur 

 

If you dont have contineous date then you may not get the result.

 

Try to create calendar table then use the same measure.

Calendar Tabel= Calendar( Min(FC month), Max(FC month))


Make sure your FC month is date format should not be a text data type.

 

I hope I answered your question!

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.