Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I want to create a waterfall chart based on two selected years.
When comparing the results of 2019 and 2020, I want to sum the number of data before 2019 and add the data added in 2020.
I want to get all the data before 2019, but when I enter the function below, an error "Cannot convert value '' of type Text to type Integer." is displayed. Why is this?
wtf_test = CALCULATE(COUNTROWS(yozai),FILTER(yozai,yozai[last_action_date] < dateTable[selectedYears]))
----------------------------------------------------------------
------------------------------------------------------------------------
Solved! Go to Solution.
Thanks.But The result did not
Do you know how to keep later years from multiple selected years in slicer as values for comparison?
wtf_前年度繰越 =
CALCULATE(COUNTROWS(yozai),FILTER(yozai,yozai[last_action_date] < dateTable[selectedyear]))
Please Try this one , if you compare multiple Year Selected
wtf_前年度繰越 =
CALCULATE(COUNTROWS(yozai),FILTER(yozai,yozai[last_action_date] IN {dateTable[selectedyear]}))
I get that same error...
If you give the date directly, it will show the value
MdxScript(Model) (42, 39) Calculation error on measure 'dateTable'[selectedyear]: value '' of type Text cannot be converted to type Integer.
ーーーーーーーーーーーーーーーーーーー
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 20 | |
| 12 | |
| 11 |