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
prebenolsen
Regular Visitor

Filter a date table with rows that have a value on January

Hi, 

 

I'll try to better explain the title here:

I have a dataset as you can see below (sample). 

I want to create a visual (barchart, table) shows the frequency of positive and negative for each month, for each ID.

The visual should only include rows that have a value in January. 

 

In the sample data, ID 1 and 2 both have values for January. ID 3 does not.

The visual should exclude ID 3, and present ID 1 and 2s positive and negative values for all months. 

 

IDMonthPositiveNegative
1January45
1February54
1March73
1April102
2January77
2February83
2March101
2April121
3February55
3March54

 

Is there an easy way of doing this, or is complex DAX required? 

1 ACCEPTED SOLUTION
tackytechtom
Super User
Super User

Hi @prebenolsen,

I have a solution here:

tomfox_0-1644957398506.png

 

I created a calcualted column so I could use it in the visual as a filter:

tomfox_1-1644957452962.png

 

tomfox_2-1644957513412.png

 

The code is as follows:

IDContainsJanuaryFilter = 
VAR _list = 
    SUMMARIZE (
        FILTER (  Table12, Table12[Month] = "January"  ),
        [ID]
    )
RETURN
IF ( Table12[ID] IN _list, 1, 0 )


Does this work for you? 🙂

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

View solution in original post

1 REPLY 1
tackytechtom
Super User
Super User

Hi @prebenolsen,

I have a solution here:

tomfox_0-1644957398506.png

 

I created a calcualted column so I could use it in the visual as a filter:

tomfox_1-1644957452962.png

 

tomfox_2-1644957513412.png

 

The code is as follows:

IDContainsJanuaryFilter = 
VAR _list = 
    SUMMARIZE (
        FILTER (  Table12, Table12[Month] = "January"  ),
        [ID]
    )
RETURN
IF ( Table12[ID] IN _list, 1, 0 )


Does this work for you? 🙂

/Tom

https://www.tackytech.blog

https://www.instagram.com/tackytechtom

 

 

 



Did I answer your question➡️ Please, mark my post as a solution ✔️

Also happily accepting Kudos 🙂

Feel free to connect with me on LinkedIn! linkedIn

#proudtobeasuperuser 

Helpful resources

Announcements
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!

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.

Top Solution Authors