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,
Can any one please correct the below expression.
My requirement is
I have to see Previous month New visitors count as by default in card i.e, Nov count and
when i have filtered Aug from MonthNameShort it has to show July New visitors count
when i have filtered July from MonthNameShort it has to show June New visitors count
so on.. Means by filtering current month it has to show previous month count.
As per below expression by default its showing November new visitors but when i have filtered Aug its showing Aug count only but i have to show July count. Please help me to correct the red color highlited section in below expression as per the requirement.
Previous Month New Visitors =
IF(
ISFILTERED('Web Analytics'[MonthNameShort]),
SUM('Web Analytics'[New Visitors]),
CALCULATE(
SUM('Web Analytics'[New Visitors]),
FILTER('Web Analytics', 'Web Analytics'[MonthNumber]= Max('Web Analytics'[MonthNumber])-1
)
))
Thanks in advance
Solved! Go to Solution.
try this
Previous Month New Visitors = VAR PreviousMonthNr = MAX ( 'Web Analytics'[MonthNumber] ) - 1 RETURN CALCULATE ( SUM ( 'Web Analytics'[New Visitors] ), FILTER ( ALL ( 'Web Analytics'[MonthNameShort], 'Web Analytics'[MonthNumber] ), 'Web Analytics'[MonthNumber] = PreviousMonthNr ) )
try this
Previous Month New Visitors = VAR PreviousMonthNr = MAX ( 'Web Analytics'[MonthNumber] ) - 1 RETURN CALCULATE ( SUM ( 'Web Analytics'[New Visitors] ), FILTER ( ALL ( 'Web Analytics'[MonthNameShort], 'Web Analytics'[MonthNumber] ), 'Web Analytics'[MonthNumber] = PreviousMonthNr ) )
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 |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |