The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello Team,
I want to calculate a SUM(Total clicks) such that it can change as and when my date slider changes.
And then, calculate " %linkclicks/Sum(total clicks)" such that this measure changes with the change in my date slider.
So, essentially I need the Clicks% column but I need both the Numerator and Denominator to change with change in dates (slider slicer)
Many Thanks!
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
ALLSELECTED function (DAX) - DAX | Microsoft Learn
Clicks measure: =
SUM( Data[Clicks] )
Clicks % measure: =
VAR _total =
CALCULATE ( SUM ( Data[Clicks] ), ALLSELECTED ( 'Calendar'[Date] ) )
RETURN
DIVIDE ( SUM ( Data[Clicks] ), _total )
Hi,
Please check the below picture and the attached pbix file.
ALLSELECTED function (DAX) - DAX | Microsoft Learn
Clicks measure: =
SUM( Data[Clicks] )
Clicks % measure: =
VAR _total =
CALCULATE ( SUM ( Data[Clicks] ), ALLSELECTED ( 'Calendar'[Date] ) )
RETURN
DIVIDE ( SUM ( Data[Clicks] ), _total )
User | Count |
---|---|
24 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |