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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Year filter

Hi all,i am new to powerbi and starting out on some simple data of sale for 3 company (Jan-Dec) over 3 years

How can I get the filter for the year based on current data?

Any hints or advice is appreciate Smiley Happy

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Anonymous ,

You can do unpivot columns on your month fields on query editor side, then you can use unpivoted month attribute field as axis, company and legend, value field as value to create chart.
Unpivot columns (Power Query)

>>How can I get the filter for the year based on current data?

I think you can write a measure to use current row content to compare with today function, then apply it on visual level filter to filter records.

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

HI @Anonymous ,

You can do unpivot columns on your month fields on query editor side, then you can use unpivoted month attribute field as axis, company and legend, value field as value to create chart.
Unpivot columns (Power Query)

>>How can I get the filter for the year based on current data?

I think you can write a measure to use current row content to compare with today function, then apply it on visual level filter to filter records.

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.