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 am trying to create an comparison page with financial data that users can select and compare 2 stores/areas/regions. The values are currently calculated (like the 35.13M) using a switch dax that changes based on what period/year is selected on the right side of the page and also whatever store/region/area is selected above them (currently using "edit interactions" for the values to update).
Is there a way to have an arrow appear based on which card value is larger when different store slicers are selected? essentially trying to compare card values and highlight the larger one. Since the values are all influenced by multiple tables/slicers, I don't know if it is possible.
The switch measure for the 35.13M is shown below with also a "filter on this visual" filter on it so it shows revenue and not all transactions.
Total Switch =
SWITCH(
SELECTEDVALUE('Period Selection'[Period Selection]),
"PTD",[PTD],
"YTD",[YTD],
"13 Periods",[P_13]
)
Solved! Go to Solution.
Hi @TacoTime ,
The same field, the same measure cannot display different selected values.
You can create a calculation table (which contains the Store column), create a measure to display the value selected by Store in the calculation table.
This will form a measure showing the value selected by the Store of Table1, and another measure showing the value selected by the Store of Table2 to achieve a comparison effect.
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Tabel_Store2 = SUMMARIZE('Table','Table'[Store])
2. Create measure.
Measure _Store1 =
var _selectyear=SELECTEDVALUE('Table'[year])
var _selectstore=SELECTEDVALUE('Table'[Store])
return
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[year]=_selectyear&&'Table'[Store]=_selectstore))
Measure—_Store2 =
var _selectyear=SELECTEDVALUE('Table'[year])
var _selectstore=SELECTEDVALUE('Tabel_Store2'[Store])
return
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[year]=_selectyear&&'Table'[Store]=_selectstore))
3. Create slicers using [year], [Store] of Table and [Store] of Tabel_Store2 respectively.
4. Result:
The two Measure display the values selected by different Stores
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @TacoTime ,
The same field, the same measure cannot display different selected values.
You can create a calculation table (which contains the Store column), create a measure to display the value selected by Store in the calculation table.
This will form a measure showing the value selected by the Store of Table1, and another measure showing the value selected by the Store of Table2 to achieve a comparison effect.
I created some data:
Here are the steps you can follow:
1. Create calculated table.
Tabel_Store2 = SUMMARIZE('Table','Table'[Store])
2. Create measure.
Measure _Store1 =
var _selectyear=SELECTEDVALUE('Table'[year])
var _selectstore=SELECTEDVALUE('Table'[Store])
return
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[year]=_selectyear&&'Table'[Store]=_selectstore))
Measure—_Store2 =
var _selectyear=SELECTEDVALUE('Table'[year])
var _selectstore=SELECTEDVALUE('Tabel_Store2'[Store])
return
CALCULATE(SUM('Table'[amount]),FILTER(ALL('Table'),'Table'[year]=_selectyear&&'Table'[Store]=_selectstore))
3. Create slicers using [year], [Store] of Table and [Store] of Tabel_Store2 respectively.
4. Result:
The two Measure display the values selected by different Stores
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
@TacoTime , if you need to use two slicer values to compare. One set should be independent slicer
How to use two Date/Period slicers:https://www.youtube.com/watch?v=WSeZr_-MiTg
if needed
Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE
How Interactions Work- Split Page using interactions to compare: https://youtu.be/GIfRKzhMaR4
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 |
---|---|
106 | |
98 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |