Hello Power BI Community,
I am working on a difficult situation (atleast for me) with a scatter plot because I need to use Unsummarized values. I have 2 tables and there is no relation between them. However, the Table1 has more data fields and all my slicers are setup based on Table1. So, naturally when a slicer is selected, it does nothing. I have one common field in both the tables, but not relatable completely. What I am trying to acheive is that if 'Table1'[common field] is sliced. I want to take that range (max & min) and want to limit the 'Table2'[common field] values that go into the scatter plot. There is a measure I created and I want to filter that measure so the plot values change indirectly.
Example tables:
TABLE 1
Name | Color | Common field |
A | RED | 2 |
A | BLUE | 25 |
B | RED | 100 |
B | BLUE | 200 |
B | YELLOW | 250 |
C | RED | 400 |
C | BLUE | 700 |
C | YELLOW | 850 |
C | GREEN | 1000 |
TABLE 2
Common Field | Value |
10 | $187543.86 |
100 | $150697.34 |
150 | $151499.66 |
200 | $143996.73 |
500 | $176483.52 |
520 | $106947.30 |
600 | $156962.43 |
650 | $199146.77 |
680 | $185979.72 |
700 | $172273.33 |
So, from the above data, I put a slicer for 'Table1'[common field], and I grabbed those min and max values in 2 measures (let's call them Min & Max) so that they are dynamic.
for example: If the slicer value is selected between 200 - 700, then my scatter plot values should be limited to $143996.73 - $172273.33
Now what I want to do is
CALCULATE(VALUES('Table2'[Value]),FILTER('Table2','Table2[common field]>=Min && 'Table2'[common field]<=Max))
This clearly did not help me. Also I tried TREATAS() and CONTAINS().
I would really appreciate any help on this one.
TIA,
Sri
@amitchandak ,Greg_Deckler, Nathaniel_C
Solved! Go to Solution.
Hi,
Not sure if this is what you are looking for?
___Test = CALCULATE(SUM(Table2[Value]), FILTER(Table2, [Common Field] >= MIN(Table1[Common field]) && [Common Field] <= MAX(Table1[Common field])))
Link to file.
Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
Hi,
Not sure if this is what you are looking for?
___Test = CALCULATE(SUM(Table2[Value]), FILTER(Table2, [Common Field] >= MIN(Table1[Common field]) && [Common Field] <= MAX(Table1[Common field])))
Link to file.
Kind regards, Steve.
Proud to be a Super User!
Awesome Keyboard Shortcusts in Power BI, thumbs up if you like the article
My Community Blog Articles (check them out!)
My Blog - Power M code to automatically detect column types -
How to create test data using DAX!
User | Count |
---|---|
133 | |
68 | |
38 | |
34 | |
22 |
User | Count |
---|---|
141 | |
64 | |
41 | |
27 | |
23 |