cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Global variables in Power BI

Hi All,

 

I have a report which contains 'Date' slicer.

I want to create 2 variables which will store the Date values for last month and month before last values based on slicer selection.

For example, if user selects 1 March 2017, then the 2 variables should have values as 1 February 2017 and 1 January 2017 respectively. 

Once I have these 2 date values I need to update the header text of table columns.

 

Please let me know of how I can achieve this.

 

Thanks in advance.

 

Regards,

Vinayak

4 REPLIES 4
Highlighted
Super User IX
Super User IX

Re: Global variables in Power BI

Not aware of a way that you can do that as described.


---------------------------------------

Not link spamming! If I posted a link in reply it is because I did assume you know how to search the web but thought it was the fastest way to fix your issue.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Highlighted
Helper I
Helper I

Re: Global variables in Power BI

Thank you for your comment @Greg_Deckler

I am evaluating custom visual approach to achieve this functionality.

Highlighted
Advocate II
Advocate II

Re: Global variables in Power BI

Hi Vinayak,

 

I am also looking for same scenario and global variable to acheive this.

 

could you please suggest how you resole this case.

 

Regards,

Deeksha

Highlighted
Helper I
Helper I

Re: Global variables in Power BI

Hi Deeksha,

 

I was unable to achieve it using global variables at that time.

 

However I had developed a custom visual similar to the 'table' visual available by default in Power BI.

It would dynamically change its column header values as per the date value selected in date slicer.

Hope this helps.

 

Regards,

Vinayak

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Solution Authors
Top Kudoed Authors