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.
Hello,
I have a function: f = a + b + c
Let:
a | b | c |
0 | 50 | 100 |
1 | 51 | 101 |
2 | 52 | 102 |
3 | 53 | 103 |
4 | 54 | 104 |
5 | 55 | 105 |
6 | 56 | 106 |
7 | 57 | 107 |
8 | 58 | 108 |
9 | 59 | 109 |
10 | 60 | 110 |
I would like to plot (f vs a) or (f vs b) or (f vs c) on a line chart. Where (f vs a) refers to Axis = a and Values = f
The Axis column is selected using a slicer, so Axis = a or b or c
I have three other what if parameters w/ single value slicers for a (slice_a), b (slice_b) and c (slice_c)
So, when Axis = a
measure f0 = 0 + slice_b + slice_c
measure f1 = 1 + slice_b + slice_c
measure f2 = 2 + slice_b + slice_c
:
measure f10 = 10 + slice_b + slice_c
Essentially, f = a + b + c, where f is calculated for every a (since Axis = a) and values for b and c are obtained from the single value what if slicers.
I use measures to calculate f0 - f10 since these values need to be dynamic depending on Axis and respective single value slicers.
I am able to dynamically change the Axis on my line chart (using unpivot), but how can I plot f values to form a single line using f0-f10?
Is there a way I can combine all my measures (f0 - f10) to create a vector/column that would go in Values on the line chart?
Solved! Go to Solution.
@tejasruparel - I cannot be certain I am following exactly what you are trying to do here. See attached PBIX below signature and see if it is at all close. If not, please explain further. I added an Index column before unpivoting and then wrote this measure:
f =
VAR __a = MAXX(FILTER('Unpivoted',[Attribute]="a"),[Value])
VAR __Index = MAX('Unpivoted'[Index])
VAR __b = MAXX(FILTER(ALL('Unpivoted'),[Attribute]="b" && [Index] = __Index),[Value])
VAR __c = MAXX(FILTER(ALL('Unpivoted'),[Attribute]="c" && [Index] = __Index),[Value])
RETURN
__a + __b + __c
Hello @Greg_Deckler
Thanks for your response.
Your approach is partly correct. In your approach f = [150, 153, 156 ... 180] for a = [0, 1, 2, ... 10], but I'm not sure how you are picking values for b and c.
I want f to be [150, 151, 152 ... 160], so b = 50 and c = 100 (these values should be picked from the single value slicer)
Please see attached PBIX
I am essentially trying to plot f as a function of a, then be able to update f based on b and c as selected from single value slicer.
Thanks.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
97 | |
81 | |
77 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |