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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

How to use presentation variables in Power Bi when migrating report from OBI EE

Hi Team,

Im migrating one of my reports from OBI EE to Power Bi.

 

In OBI EE i have used presentation variables which capture boundary limit.

SUM(Table.Column BY People, Yearmonth) <= @{Var}{7} 

This is the formula which is being used to calculate sum of all the values those are under 7.

 

How do i create the same scenario in Power BI?

In my research, i found that we can create a custom filter and use "SelectedValue" to fetch that value.

But im not sure how to do this, any help would be great!

4 REPLIES 4
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,


How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

We can create a measure and use it in table visual like following:

 

Measure = 
CALCULATE ( SUM ( 'Table'[Column] ), 'Table'[Column] <= 7 )

10.PNG

 

Or we can just create a calculated table to generate the result:

 

SumTable = 
SUMMARIZECOLUMNS (
    'Table'[People],
    'Table'[YearMonth],
    "SumValue", CALCULATE ( SUM ( 'Table'[Column] ), 'Table'[Column] <= 7 )
)

11.PNG

 

If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello,

I have same problem.

7 in this problem is a variable that means change when user change the report filter. 

And I want to use this variable like a report filter. 

 

Thanks

Nathaniel_C
Super User
Super User

Hi @Anonymous ,

If I understand your expected output, you might try something like this. Measure = SUMX(table,IF( table[yearmonth]<=7,table[People])). SUMX takes a table, so it knows which table, and then iterates over that table row by row using the expression on each row, and then sums the results of each row. So if we use an IF statement, it should sum all numbers of People.  You may need to have a relationship between two tables if there are more than one table. 
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





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

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors