Forum Discussion
Dynamic filter for year
- 6 years ago
Hi Stabbathehut
Do you add [date] column from a date table, then add"corresponding documents" to the same table visual?
If so, you could create a relationship between two tables.
For example, my date table is create as below:
date table = ADDCOLUMNS(CALENDAR(DATE(2020,1,1),DATE(2022,12,31)),"year",YEAR([Date]),"month",MONTH([Date])) add a calculated column firstdayperyear = CALCULATE(MIN('date table'[Date]),ALLEXCEPT('date table','date table'[year]))Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
measure=if(max(table[revision Date]) in {2020,2022},1,0)
Add it visual level filter ans set it to 1
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
check my blog here
https://community.powerbi.com/t5/Community-Blog/Connecting-to-a-Tabular-Model-Using-Power-BI/ba-p/913784
Hi, thanks for the prompt response.
How would I have these as seperate measures for each 2020 and 2022?
Would like to show them in 2 instances
- Anonymous6 years agoNot applicable
what measure are you expecting?
I will give one example of count.
measure1=Calculate(Count(Table[Column]),filter(table,Table[year]=2020))
measure2=Calculate(Count(Table[Column]),filter(table,Table[year]=2022))
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.check my blog here
https://community.powerbi.com/t5/Community-Blog/Connecting-to-a-Tabular-Model-Using-Power-BI/ba-p/913784- Stabbathehut6 years agoFrequent Visitor
Hi I am trying to say, if date = 2020 I would like to show the values corresponding to it. So in the image below it only shows 2020 with the corresponding documents
- v-juanli-msft6 years agoCommunity Support
Hi Stabbathehut
Do you add [date] column from a date table, then add"corresponding documents" to the same table visual?
If so, you could create a relationship between two tables.
For example, my date table is create as below:
date table = ADDCOLUMNS(CALENDAR(DATE(2020,1,1),DATE(2022,12,31)),"year",YEAR([Date]),"month",MONTH([Date])) add a calculated column firstdayperyear = CALCULATE(MIN('date table'[Date]),ALLEXCEPT('date table','date table'[year]))Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.