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.
Hi ,
I have four slicer values in raw data : Tab1, Tab2,Tab3,Tab4
I want to show data based four Slicer Values : Tab1,Tab2,Site,Total
Formula
Site = Tab3 +Tab4
Total = Tab1+Tab2+Tab3+Tab4
Any idea how to do this in Power Bi
Thanks
Solved! Go to Solution.
Hi @Anonymous ,
You can create a new table for slicer:
Table 2 = UNION(UNION(VALUES('Table'[Region]),ROW("Region","Site")),ROW("Region","Total"))
Then you can create the following measure:
Measure =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Tab1", CALCULATE ( SUM ( 'Table'[Actual Value] ), 'Table'[Region] = "Tab1" ),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Tab2", CALCULATE ( SUM ( 'Table'[Actual Value] ), 'Table'[Region] = "Tab2" ),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Tab3", CALCULATE ( SUM ( 'Table'[Actual Value] ), 'Table'[Region] = "Tab3" ),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Tab4", CALCULATE ( SUM ( 'Table'[Actual Value] ), 'Table'[Region] = "Tab4" ),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Site",
CALCULATE (
SUM ( 'Table'[Actual Value] ),
'Table'[Region] = "Tab3"
|| 'Table'[Region] = "Tab4"
),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Total", SUM ( 'Table'[Actual Value] )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
@Anonymous , not very clear. The information you have provided is not making the problem clear to me. Can you please explain with an example.
refer
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
measure slicer
https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slicer-parameter-table-pattern
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/500115
https://www.youtube.com/watch?v=vlnx7QUVYME
Actual Data
Actual Value | Region |
1 | Tab1 |
2 | Tab2 |
6 | Tab3 |
9 | Tab 4 |
Below Required
Actual Value | Region |
1 | Tab1 |
2 | Tab2 |
15 | Site |
18 | Total |
Site = Tab3 +Tab4
Total = Tab1+Tab2+Tab3+Tab4
Hi @Anonymous ,
You can create a new table for slicer:
Table 2 = UNION(UNION(VALUES('Table'[Region]),ROW("Region","Site")),ROW("Region","Total"))
Then you can create the following measure:
Measure =
SWITCH (
TRUE (),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Tab1", CALCULATE ( SUM ( 'Table'[Actual Value] ), 'Table'[Region] = "Tab1" ),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Tab2", CALCULATE ( SUM ( 'Table'[Actual Value] ), 'Table'[Region] = "Tab2" ),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Tab3", CALCULATE ( SUM ( 'Table'[Actual Value] ), 'Table'[Region] = "Tab3" ),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Tab4", CALCULATE ( SUM ( 'Table'[Actual Value] ), 'Table'[Region] = "Tab4" ),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Site",
CALCULATE (
SUM ( 'Table'[Actual Value] ),
'Table'[Region] = "Tab3"
|| 'Table'[Region] = "Tab4"
),
SELECTEDVALUE ( 'Table 2'[Region] ) = "Total", SUM ( 'Table'[Actual Value] )
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |