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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
utsavlexmark
Helper III
Helper III

Measures are not working with filter On

Hello,

Let me give you an idea about the data I am working with.

Year

Month

Code

DATA

Instances

2020

Mar

SI

A

2

2020

Mar

SC

A

1

2020

Mar

SI

B

2

2020

Mar

SC

B

1

2020

Apr

SI

A

2

2020

Apr

SC

A

1

2020

Apr

SI

B

2

2020

Apr

SC

B

1

 

“SI” and “SC” are code added with unique ID such as “A” and “B”.

First requirement was; I wanted a column to show the instance of each unique ID based on generic code.

DATA

Instances (SI)

Instances (SC)

A

4

2

B

4

2

 

This is working with the following “Measures”

  1. Sum Instance = SUM(Data[Instance])
  2. Instances (SI) = CALCULATE([Sum Instance],FILTER(ALLEXCEPT(Data,Data[DATA]),Data[Code]="SI"))
  3. Instances (SC) = CALCULATE([Sum Instance],FILTER(ALLEXCEPT(Data,Data[DATA]),Data[Code]="SC"))

 

When I am seeing the total data these measures are working perfectly. But When I am trying to see with monthly filter on – like for Mar or Apr; data is incorrect.

 

I have a doubt that due to the first measure the problem is there in case of Month filter on.

 

Can anyone guide me?

 

Please let me know if I am not clear with my issue.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@utsavlexmark , Try like

Sum Instance = SUM(Data[Instance])
Instances (SI) = CALCULATE([Sum Instance],FILTER(Data,Data[Code]="SI"))
Instances (SC) = CALCULATE([Sum Instance],FILTER(Data,Data[Code]="SC"))

or


Sum Instance = SUM(Data[Instance])
Instances (SI) = CALCULATE([Sum Instance],FILTER(allselected(Data),Data[Code]="SI"))
Instances (SC) = CALCULATE([Sum Instance],FILTER(allselected(Data),Data[Code]="SC"))

 

allexcept mean only that filter will work

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@utsavlexmark , Try like

Sum Instance = SUM(Data[Instance])
Instances (SI) = CALCULATE([Sum Instance],FILTER(Data,Data[Code]="SI"))
Instances (SC) = CALCULATE([Sum Instance],FILTER(Data,Data[Code]="SC"))

or


Sum Instance = SUM(Data[Instance])
Instances (SI) = CALCULATE([Sum Instance],FILTER(allselected(Data),Data[Code]="SI"))
Instances (SC) = CALCULATE([Sum Instance],FILTER(allselected(Data),Data[Code]="SC"))

 

allexcept mean only that filter will work

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors