The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I want to compare the values for the week of January 1st with the week of February 1st, does anyone know of a function that solves this?
Solved! Go to Solution.
@GabrielRF You can find the first week of the month by doing something like this:
Measure =
VAR __FWJan = WEEKNUM( DATE( 2024, 1, 1 ) )
VAR __FWFeb = WEEKNUM( DATE( 2024, 2, 1 ) )
VAR __Jan = SUMX( FILTER( 'Table', WEEKNUM([Date]) = __FWJan ), [Value] )
VAR __Feb = SUMX( FILTER( 'Table', WEEKNUM([Date]) = __FWFeb ), [Value] )
VAR __Result = __Feb - __Jan
RETURN
__Result
@GabrielRF You can find the first week of the month by doing something like this:
Measure =
VAR __FWJan = WEEKNUM( DATE( 2024, 1, 1 ) )
VAR __FWFeb = WEEKNUM( DATE( 2024, 2, 1 ) )
VAR __Jan = SUMX( FILTER( 'Table', WEEKNUM([Date]) = __FWJan ), [Value] )
VAR __Feb = SUMX( FILTER( 'Table', WEEKNUM([Date]) = __FWFeb ), [Value] )
VAR __Result = __Feb - __Jan
RETURN
__Result
User | Count |
---|---|
14 | |
12 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
13 | |
8 | |
5 |