Forum Discussion
Create a Variable for Text Box's
- Anonymous4 years ago
Hi Anonymous ,
I created some data:
In Excel,
Sheet1:
2022.1.1 – 2022.2.28
Sheet2:
2022.1.1 – 2022.2.23
Sheet3:
2022.1.1 – 2022.2.16
Here are the steps you can follow:
1. Create measure.
Flag1 = IF( YEAR( MAX('Sheet1'[Date]))=YEAR(MAXX(ALL('Sheet1'[Date]),[Date]))&&MONTH(MAX('Sheet1'[Date]))=MONTH(MAXX(ALL('Sheet1'[Date]),[Date])),1,0 )Flag2 = IF( YEAR( MAX('Sheet2'[Date]))=YEAR(MAXX(ALL('Sheet2'[Date]),[Date]))&&MONTH(MAX('Sheet2'[Date]))=MONTH(MAXX(ALL('Sheet2'[Date]),[Date])),1,0 )Flag3 = IF( YEAR( MAX('Sheet3'[Date]))=YEAR(MAXX(ALL('Sheet3'[Date]),[Date]))&&MONTH(MAX('Sheet3'[Date]))=MONTH(MAXX(ALL('Sheet3'[Date]),[Date])),1,0 )2. Put [Flag1] , [Flag2] , [Flag3] in the corresponding Visual - Filter in Page1, Page2, Page3.
3. When you update to a new date in Excel, you can directly click Refresh, and then Page1, Page2, and Page3 will display the data of the current month on the latest date
4. Result:
Update the date to March in Excel, after refreshing, the data for March is displayed in Page1.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi Anonymous ,
I created some data:
In Excel,
Sheet1:
2022.1.1 – 2022.2.28
Sheet2:
2022.1.1 – 2022.2.23
Sheet3:
2022.1.1 – 2022.2.16
Here are the steps you can follow:
1. Create measure.
Flag1 =
IF(
YEAR( MAX('Sheet1'[Date]))=YEAR(MAXX(ALL('Sheet1'[Date]),[Date]))&&MONTH(MAX('Sheet1'[Date]))=MONTH(MAXX(ALL('Sheet1'[Date]),[Date])),1,0
)Flag2 =
IF(
YEAR( MAX('Sheet2'[Date]))=YEAR(MAXX(ALL('Sheet2'[Date]),[Date]))&&MONTH(MAX('Sheet2'[Date]))=MONTH(MAXX(ALL('Sheet2'[Date]),[Date])),1,0
)Flag3 =
IF(
YEAR( MAX('Sheet3'[Date]))=YEAR(MAXX(ALL('Sheet3'[Date]),[Date]))&&MONTH(MAX('Sheet3'[Date]))=MONTH(MAXX(ALL('Sheet3'[Date]),[Date])),1,0
)
2. Put [Flag1] , [Flag2] , [Flag3] in the corresponding Visual - Filter in Page1, Page2, Page3.
3. When you update to a new date in Excel, you can directly click Refresh, and then Page1, Page2, and Page3 will display the data of the current month on the latest date
4. Result:
Update the date to March in Excel, after refreshing, the data for March is displayed in Page1.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly