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 Experts
I am trying to work out the values for the same period last year, cannot see the wood for the trees as what i am doing wrong..
CALCULATE([TotalAssessments],SAMEPERIODLASTYEAR(DimDate[Month&Year])))
TotalAssessment = Measure 1 + Measure 2
Solved! Go to Solution.
@Anonymous,
What result would you like to get? Could you please share sample data of your table and post expected result based on sample data here?
If you add the measure to Matrix and it doesn't return correct total value, please create a new measure using DAX below and drag the measure to your Matrix visual. The RowField is the field that you drag to Rows of Matrix visual.
SamePeriodLastYear= CALCULATE([TotalAssessments],FILTER(ALL(DimDate),DimDate[Year]=MAX(DimDate[Year])-1),SAMEPERIODLASTYEAR(DimDate[Date]))
NewMeasure = IF(COUNTROWS(VALUES(Table[RowField]))=1, [SamePeriodLastYear],SUMX(VALUES(Table[RowField]),[SamePeriodLastYear]))
Regards,
Lydia
@Anonymous,
What result would you like to get? Could you please share sample data of your table and post expected result based on sample data here?
If you add the measure to Matrix and it doesn't return correct total value, please create a new measure using DAX below and drag the measure to your Matrix visual. The RowField is the field that you drag to Rows of Matrix visual.
SamePeriodLastYear= CALCULATE([TotalAssessments],FILTER(ALL(DimDate),DimDate[Year]=MAX(DimDate[Year])-1),SAMEPERIODLASTYEAR(DimDate[Date]))
NewMeasure = IF(COUNTROWS(VALUES(Table[RowField]))=1, [SamePeriodLastYear],SUMX(VALUES(Table[RowField]),[SamePeriodLastYear]))
Regards,
Lydia
Hi lydia
the total should be the sum of the individual periods as shown above...i.e. 34+21+ etc....
forgot to mention that
totalassessment is made up of two measures...
1. Remote1Assessment = CALCULATE(COUNTROWS(Table),Table[Field1]="true") and
2. Remote2Assessment = CALCULATE(COUNTROWS(Table),Table[Field2]="true")
I have re worked the formula to..
= CALCULATE([TotalAssessments],FILTER(ALL(DimDate),DimDate[Year]=MAX(DimDate[Year])-1),SAMEPERIODLASTYEAR(DimDate[Date]))
but the total is wrong...
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |