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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ksax
Regular Visitor

current value

Hi...could anyone please help me with this?

 

I try to create a new query, then from 'Manage Parameters' tab I selected 'new parameter' then I am stuck with this so called 'current value'....where do I get current value number?  

 

 

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @ksax

I usually enter the value I want to use for my query in the current value.

View solution in original post

v-ljerr-msft
Employee
Employee

Hi @ksax,

 

The Current Value setting allows users to specify the value for the parameter in the current report. 

 

It should be noted that if the Required check box is enabled, this field must be filled in. Otherwise the Current Value is optional. This item is very much like the default value for a parameter in SSRS. You may also want to note that currently only a single value is allowed. For more details about using Parameters in Power BI, you can refer to this article. Smiley Happy

 

Regards

View solution in original post

10 REPLIES 10
Anonymous
Not applicable

We're also interested in andrewt's ask.

v-ljerr-msft
Employee
Employee

Hi @ksax,

 

The Current Value setting allows users to specify the value for the parameter in the current report. 

 

It should be noted that if the Required check box is enabled, this field must be filled in. Otherwise the Current Value is optional. This item is very much like the default value for a parameter in SSRS. You may also want to note that currently only a single value is allowed. For more details about using Parameters in Power BI, you can refer to this article. Smiley Happy

 

Regards

Great suggestion on the Required. Hoever, my Parameter now returns 'blank' in PowerQuery (! not in PowerBi Dax, in M code), even though it only holds one value in the List. How to fix this?

 

Note my question is for PowerBi Report Server (Jan 2021). This might be fixed in Desktop version; you can use the filter slection as "use Parameter" rather than a Date. But not sure if that makes it work there either. 

I have the same question: how to FORCE a Parameter to return the 'max' or single value in the List? It currently says 'blank'. Not found an answer yet, but have not spent more than 30 mins googling. 

Anonymous
Not applicable

What if you want the param to have a value from a query rather than a literal value?  For example, I have a query that returns a list with one value (a date). I want my parameter to have that value, but instead it's only passing "Current Value" to the query (which is no more useful than hardcoding some value into the query). 

@Anonymous  - Any chance you found a solution to your particular callout? Trying to achieve the same solution you mention here. 

Anonymous
Not applicable

I'm facing the same issue, the value is not changing even if the date returned by the query is changing as can be seen in preview. Basically i want to implement this to create calendar table based on Start Date and End Date where start date and end date will come view. But it's taking only default value set at the time declaring the parameter.

I'm trying to do something similar.  I'd like "Current Calue" to be Now() so that it suggests today's date as the default vlaue for the parameter.  Is there a way to do this?  

To fix sepcifically your requirement to pass "TODAY's DATE" into the PowerQuery statement, you can use "DateTime.FixedLocalNow()". You will need to do this in the Advanced Editor I think. You might need to format the DateTime result to a Date format or even Text depending on the requirement of the database, keep that in mind.

 

Note: you can now also change this to a Relative date in the past using AddDates. 

 

Example: {DateTime.Date(Date.AddDays(DateTime.FixedLocalNow(),-90))

Anonymous
Not applicable

Hi @ksax

I usually enter the value I want to use for my query in the current value.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.