Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I have a query on using a yearly slicer or any created slicer using DAX code which illustrates the percentage of countrows (see code below). Is there anyway if I select a single "Year" using already created slicer only the results of that particular year countrow total is being calulated per. percentage?
If I select multiple slicer's is it possible to only illustrate total percentages of those selected categories?
I've seen some solutions on the web that used DAX's SELECTEDVALUES but it's not very clear on how to apply that to my problem.
Thank you for your help
Before Year is Selected
After "Year" is selected
Percentage Accepted =
VAR _SelectPeriod =
CALCULATE(
COUNTROWS(FILTER('MajorIncidentTickets_2022-23','MajorIncidentTickets_2022-23'[major_incident_state]="Accepted")))
VAR _Total =
COUNTROWS(FILTER('MajorIncidentTickets_2022-23','MajorIncidentTickets_2022-23'[major_incident_state]="Accepted")
)
RETURN
DIVIDE ( _SelectPeriod, _Total )
Solved! Go to Solution.
I was able to find a solution(see below) using the "SELECTEDVALUE" along with other parameters
TestSlicer =
VAR selectedYear = SELECTEDVALUE('MajorIncidentTickets_2022-23'[Promote Duration])
return
CALCULATE([TotalPromote],
FILTER('MajorIncidentTickets_2022-23','MajorIncidentTickets_2022-23'[Promote Duration]=selectedYear)
)
I was able to find a solution(see below) using the "SELECTEDVALUE" along with other parameters
TestSlicer =
VAR selectedYear = SELECTEDVALUE('MajorIncidentTickets_2022-23'[Promote Duration])
return
CALCULATE([TotalPromote],
FILTER('MajorIncidentTickets_2022-23','MajorIncidentTickets_2022-23'[Promote Duration]=selectedYear)
)
Correct, you should also be able to go to format and configure how the visuals interact with each other (cross-filter/cross-highlight/none)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |