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
Meri93
Frequent Visitor

Create a new table from existing one using slicer values

Hello everyone,


I have a Table t with 3 columns - Name of the company, Financial item and Value of the financial item. Financial item represents the name of the certain item in financial report, like cost of employees, revenue from online sales etc.. I am trying to make a dashboard where user can select multiple finacials items and for each item select different range of values. For example, user wants to see all companies that have revenue from online sales bigger than 100k and at the same time tax liabilities lower than 10k.

 

This is what I have so far:

I created 4 additional tables (Item1,Value1,Item2,Value2). Item1 and Item 2 are identical and they have only one column - Financial_Item which contains distinct Financial Items. Value1 and Value2 are also identical and they contain all values of the Financial items from the original table (Column name = Value). Then, I made 4 slicers:
1. Two dropdown slicers from which you can choose Financial item. One slicer refers to Item1 and other to Item2.
2. Two Range slicer where you select range of values for that Financial item. One slicer refers to Value1 and other to Value2.

Then, I created following measures:
1. Select_Item1 = SELECTEDVALUE(Item1[Financial_Item])
2. Select_Min1 = CALCULATE(MIN(Value1[Value]); allselected(Value1))
3. Select_Max1 = CALCULATE(MAX(Value1[Value]); allselected(Value1))
4. Select_Item2 = SELECTEDVALUE(Item2[Financial_Item])
5. Select_Min2 = CALCULATE(MIN(Value2[Value]); allselected(Value2))
6. Select_Max2 = CALCULATE(MAX(Value2[Value]); allselected(Value2))

 

So far, every step works perfectly, but I encounter a problem in the next step in which I try to make a new table that contains list of the companies with given conditions using calculated measures. I tried using FILTER, CALCULATETABLE, but nothing has worked so far. I think that the problem is that the measures I have created are not global variables so I can not use them in creating new tables.

Does someone know how can I create global variables from the selected slicer values so I can create new table or maybe can suggest some other solution?

 

Thank you!

4 REPLIES 4
parry2k
Super User
Super User

@Meri93 it will be easier to understand the problem if you provide sample data in table format and the expected output.

Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi @parry2k ,

 

Here is sample table:

Name of the companyFinancial ItemValue
ARevenue from online sales110.000,00
AOther revenue10.000,00
ACost of revenue30.000,00
ACost of employees20.000,00
AIncome before tax70.000,00
AInterest income5.000,00
ATax8.400,00
ANet income61.600,00
BRevenue from online sales105.000,00
BOther revenue40.000,00
BCost of revenue20.000,00
BCost of employees10.000,00
BIncome before tax115.000,00
BInterest income1.000,00
BTax13.800,00
BNet income101.200,00
CRevenue from online sales150.000,00
COther revenue5.000,00
CCost of revenue100.000,00
CCost of employees50.000,00
CIncome before tax5.000,00
CInterest income1.000,00
CTax600,00
CNet income4.400,00
DRevenue from online sales10.000,00
DOther revenue1.000,00
DCost of revenue6.000,00
DCost of employees6.000,00
DIncome before tax-1.000,00
DInterest income1.000,00
DTax0,00
DNet income-1.000,00

 

The user will choose financial Item and value range for that financial item. The output shold be the list of companies that meet those conditions. For example, user wants to see which companies have Revenue from online sales bigger than 100.000,00 and at the same time Tax lower than 10.000,00.  In our example, only A and C companies meet those conditions so the output should look like this:

 

Name of the company
A
C

Has someone maybe figured out how to do this? I am also interested in solution.

Meri93
Frequent Visitor

@ante87 , unfortunately still nothing... I will post it here if I figure out the solution.

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.