Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
I have a dataset consisting of lease numbers, accrual periods, production dates, and volumes by product. I'm trying to do a simple FILTER() function as a measure, but am getting this error: "The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value." Does anyone know why? I've also tried to create a New Table with the same expression, but it returns the same error.
This is the expression:
Table1 = FILTER('Sheet1',[Accrual_Period_Date] = 01/01/2023)
I also tried:
Table1 = FILTER('Sheet1',[Accrual_Period_Date] = "01/01/2023")
Attached is the pbix with the Table1 measure and the Table1 calculated table.
Does anyone know why it is producing this error, and what the correct way to write the expression would be? Thanks!
Solved! Go to Solution.
ok you don't need two tables. You just have to check if a product and date existing in the prior period. You can set your slicer to filter on the current period
the results I got were
measure assumes you want
1. if the period you choose in your slicer is the earliest period you have data for, then return no rows
2. if the product and date exist in the prior month (period) then do not show it
3. if the product and the date do not exist in the prior month then show that row
@bsheffer Thank you so much! This helped tremendously. One more question...If I want to now see the opposite...where it exists in the previous month but does not exist in the current month, what would that look like?
I don't think you can as the slicer is filtering the table to the accrual date. You can't show the prior period on that filtered table.
I created a new forum message detailing exactly what I want to do here. Thanks so much for your help! Take a look at this if you have time:
https://community.powerbi.com/t5/Desktop/Need-to-create-measure-that-compares-between-the-selected-d...
you are creating a table, not a measure so you can't use selectedvalue as that will always return a blank if there is more than one date. This table will be re-created when you refresh your data so it is not dynamic like a measure is.
I think you need to better describe what you are trying to accomplish
@bsheffer Here is the bigger picture: I'm trying to compare between two accrual period dates dynamically to see if it exists in the current accrual period(for example, 01/01/2023), but not in the previous accrual period(12/01/2022), but having a slicer vertical list for Accrual_Period_Date so you can select your "current accrual period date".
This is what I tried:
@bsheffer Thank you! That did work. Now if I were to change it to be: FILTER('Sheet1',SELECTEDVALUE(Sheet1[Accrual_Period_Date]))
How can I get that to work?
change your date to
@bsheffer Thank you! That did work. Now if I were to change it to be: FILTER('Sheet1',SELECTEDVALUE(Sheet1[Accrual_Period_Date]))
How can I get that to work?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.