Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
It gives me correct values
Did you try this formula
Column =
VAR Priorday =
CALCULATE (
MAX ( TableName[Week] ),
FILTER ( ALL ( TableName ), TableName[Week] < EARLIER ( TableName[Week] ) )
)
RETURN
DIVIDE (
TableName[Conversions],
CALCULATE (
SUM ( TableName[Conversions] ),
FILTER ( TableName, TableName[Week] = Priorday )
)
)
- 1
Could you show me the screenshot of your formula?
If your Weeks are simple dates with 7 days gap then this calculated column should work
Colum =
VAR Priorday =
PREVIOUSDAY ( TableName[Week] )
RETURN
DIVIDE (
TableName[Conversions],
CALCULATE (
SUM ( TableName[Conversions] ),
FILTER ( TableName, TableName[Week] = Priorday )
)
)
- 1
Hi @sewaktamang
Please try with this minor modification (HIghlighted in RED below)
Colum =
VAR Priorday =
PREVIOUSDAY ( TableName[Week] )
RETURN
DIVIDE (
TableName[Conversions],
CALCULATE (
SUM ( TableName[Conversions] ),
FILTER ( ALL ( TableName ), TableName[Week] = Priorday )
)
)
- 1
PREVIOUSDAY ( TableName[Week] )
THis is giving Empty Column
my mistake. PreviousDays do not exist since there are gaps in dates
Please use the revised formula. I provided above. It shall work hopefully
It is giving me date value 😞
Column
| Friday, 29 December 1899 |
| Saturday, 30 December 1899 |
| Saturday, 30 December 1899 |
| Saturday, 30 December 1899 |
| Saturday, 30 December 1899 |
It gives me correct values
Did you try this formula
Column =
VAR Priorday =
CALCULATE (
MAX ( TableName[Week] ),
FILTER ( ALL ( TableName ), TableName[Week] < EARLIER ( TableName[Week] ) )
)
RETURN
DIVIDE (
TableName[Conversions],
CALCULATE (
SUM ( TableName[Conversions] ),
FILTER ( TableName, TableName[Week] = Priorday )
)
)
- 1
Could you show me the screenshot of your formula?
A small improvement to this formula so that you do not get -100% for firstweek/firstdate
HIghlighted in RED font below
Column =
VAR Priorday =
CALCULATE (
MAX ( TableName[Week] ),
FILTER ( ALL ( TableName ), TableName[Week] < EARLIER ( TableName[Week] ) )
)
RETURN
IF (
NOT ( ISBLANK ( Priorday ) ),
DIVIDE (
TableName[Conversions],
CALCULATE (
SUM ( TableName[Conversions] ),
FILTER ( TableName, TableName[Week] = Priorday )
)
)
- 1
)
Hi @sewaktamang
My apologies.
Please use this formula
This will get you correct results
Column =
VAR Priorday =
CALCULATE (
MAX ( TableName[Week] ),
FILTER ( ALL ( TableName ), TableName[Week] < EARLIER ( TableName[Week] ) )
)
RETURN
DIVIDE (
TableName[Conversions],
CALCULATE (
SUM ( TableName[Conversions] ),
FILTER ( TableName, TableName[Week] = Priorday )
)
)
- 1
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.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 68 | |
| 66 | |
| 31 | |
| 28 | |
| 24 |