Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
barbaracruvinel
Frequent Visitor

Cumulative month javascript - power bi

I am using power slicer in power BI to use in filter selection.

I need them to be selected every month until the current month.

I'm using getMonth() (code in javascritp) but it only returns me the current month and I need them all up to the current month (example: it's September, so I need it to return me January, February, March, April, may, june, july, august and september).

Captura de tela 2021-09-01 145548.png

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @barbaracruvinel 

The visual  seems to only allow you to get a single value with a js statement.

I'm not familiar with this custom visual , you may need to contact their development team.

Due to the built-in watermark, it is not recommended to use this slicer for commercial purposes.

 

If you are looking to set default value for a slicer, you might want to refer to these related threads.

Default value for Slicer 

Setting-the-Default-Value-of-a-Slicer 

Power-Slicer-Custom-Visual 

 

Best Regards,
Community Support Team _ Eason

 

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors