Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello.
I have a measure below:
Solved! Go to Solution.
1. Branch with the Lowest %
DAX
Branch with Lowest % =
VAR vSummary =
ADDCOLUMNS (
VALUES ( View_Aff_Region_Branch[Branch Name] ),
"StressValue", [Stress_Indicator(%)]
)
VAR vFiltered =
FILTER(vSummary, NOT(ISBLANK([StressValue])))
RETURN
IF(
ISFILTERED('Calendar'[Period]), // Replace with your actual calendar column
MAXX (
TOPN ( 1, vFiltered, [StressValue], ASC ),
View_Aff_Region_Branch[Branch Name]
),
BLANK()
)
2. The Lowest % of that Branch
DAX
Lowest % Value =
VAR vSummary =
ADDCOLUMNS (
VALUES ( View_Aff_Region_Branch[Branch Name] ),
"StressValue", [Stress_Indicator(%)]
)
VAR vFiltered =
FILTER(vSummary, NOT(ISBLANK([StressValue])))
RETURN
IF(
ISFILTERED('Calendar'[Period]),
MINX (
vFiltered,
[StressValue]
),
BLANK()
)
3. Branch with the Highest %
DAX
Branch with Highest % =
VAR vSummary =
ADDCOLUMNS (
VALUES ( View_Aff_Region_Branch[Branch Name] ),
"StressValue", [Stress_Indicator(%)]
)
VAR vFiltered =
FILTER(vSummary, NOT(ISBLANK([StressValue])))
RETURN
IF(
ISFILTERED('Calendar'[Period]),
MAXX (
TOPN ( 1, vFiltered, [StressValue], DESC ),
View_Aff_Region_Branch[Branch Name]
),
BLANK()
)
4. The Highest % of that Branch
DAX
Highest % Value =
VAR vSummary =
ADDCOLUMNS (
VALUES ( View_Aff_Region_Branch[Branch Name] ),
"StressValue", [Stress_Indicator(%)]
)
VAR vFiltered =
FILTER(vSummary, NOT(ISBLANK([StressValue])))
RETURN
IF(
ISFILTERED('Calendar'[Period]),
MAXX (
vFiltered,
[StressValue]
),
BLANK()
)
If you want to always show the latest period, you can add a filter in your measure to only consider the latest period:
DAX
VAR LatestPeriod = CALCULATE(MAX('Calendar'[Period]), ALL('Calendar'))
...
FILTER(ALL('Calendar'), 'Calendar'[Period] = LatestPeriod)
Proud to be a Super User! |
|
1. Branch with the Lowest %
DAX
Branch with Lowest % =
VAR vSummary =
ADDCOLUMNS (
VALUES ( View_Aff_Region_Branch[Branch Name] ),
"StressValue", [Stress_Indicator(%)]
)
VAR vFiltered =
FILTER(vSummary, NOT(ISBLANK([StressValue])))
RETURN
IF(
ISFILTERED('Calendar'[Period]), // Replace with your actual calendar column
MAXX (
TOPN ( 1, vFiltered, [StressValue], ASC ),
View_Aff_Region_Branch[Branch Name]
),
BLANK()
)
2. The Lowest % of that Branch
DAX
Lowest % Value =
VAR vSummary =
ADDCOLUMNS (
VALUES ( View_Aff_Region_Branch[Branch Name] ),
"StressValue", [Stress_Indicator(%)]
)
VAR vFiltered =
FILTER(vSummary, NOT(ISBLANK([StressValue])))
RETURN
IF(
ISFILTERED('Calendar'[Period]),
MINX (
vFiltered,
[StressValue]
),
BLANK()
)
3. Branch with the Highest %
DAX
Branch with Highest % =
VAR vSummary =
ADDCOLUMNS (
VALUES ( View_Aff_Region_Branch[Branch Name] ),
"StressValue", [Stress_Indicator(%)]
)
VAR vFiltered =
FILTER(vSummary, NOT(ISBLANK([StressValue])))
RETURN
IF(
ISFILTERED('Calendar'[Period]),
MAXX (
TOPN ( 1, vFiltered, [StressValue], DESC ),
View_Aff_Region_Branch[Branch Name]
),
BLANK()
)
4. The Highest % of that Branch
DAX
Highest % Value =
VAR vSummary =
ADDCOLUMNS (
VALUES ( View_Aff_Region_Branch[Branch Name] ),
"StressValue", [Stress_Indicator(%)]
)
VAR vFiltered =
FILTER(vSummary, NOT(ISBLANK([StressValue])))
RETURN
IF(
ISFILTERED('Calendar'[Period]),
MAXX (
vFiltered,
[StressValue]
),
BLANK()
)
If you want to always show the latest period, you can add a filter in your measure to only consider the latest period:
DAX
VAR LatestPeriod = CALCULATE(MAX('Calendar'[Period]), ALL('Calendar'))
...
FILTER(ALL('Calendar'), 'Calendar'[Period] = LatestPeriod)
Proud to be a Super User! |
|
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.