We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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 |
|---|---|
| 57 | |
| 40 | |
| 36 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 38 | |
| 34 | |
| 23 |