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
powerbi5353
New Member

Table - Using String Data Applying Different Filters (Ignoring Table Filters)

New to BI - I have a table of data that is filtered by a specific year. I also want to bring in data from a prior year for comparative purposes. The way my data is structured I need to apply filters on the specific year to see each years data so I need to bring in prior year data that ignores the table filters and allows me to apply a different filter. My data is in string format. Essentially looking to achieve the same outcome as 'CALCULATE' (fixed LOD) but for string data.

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @powerbi5353  - You can create a calculated column or a measure like this

 

eg: 

PriorYearComment =
CALCULATE(
MAX(SalesData[Comment]), -- or CONCATENATEX(...) if multiple comments
FILTER(
ALL(SalesData), -- removes existing filters on the table
SalesData[Year] = FORMAT(VALUE(SELECTEDVALUE(SalesData[Year])) - 1, "0000")
&& SalesData[Customer] = SELECTEDVALUE(SalesData[Customer])
)
)

 

You filter the visual or report using Year = 2024, but you want to retrieve Comment from 2023. hope this works. please check





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @powerbi5353 

I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.

 

Anonymous
Not applicable

Hi @powerbi5353 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

 

Anonymous
Not applicable

Hi @powerbi5353 
Thank you for reaching out microsoft fabric community forum.
I wanted to check if you had the opportunity to review the information provided by @rajendraongole1 . Please feel free to contact us if you have any further questions. If his response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
rajendraongole1
Super User
Super User

Hi @powerbi5353  - You can create a calculated column or a measure like this

 

eg: 

PriorYearComment =
CALCULATE(
MAX(SalesData[Comment]), -- or CONCATENATEX(...) if multiple comments
FILTER(
ALL(SalesData), -- removes existing filters on the table
SalesData[Year] = FORMAT(VALUE(SELECTEDVALUE(SalesData[Year])) - 1, "0000")
&& SalesData[Customer] = SELECTEDVALUE(SalesData[Customer])
)
)

 

You filter the visual or report using Year = 2024, but you want to retrieve Comment from 2023. hope this works. please check





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.