Forum Discussion
kdsan
8 years agoRegular Visitor
Count based on change in year
Good morning. PowerBI newbie here. I have used power query before and, to a (much) lesser extent, power pivot. Doing this for a class project but I'd also like to be able to leverage this for ...
- 8 years ago
Try this calculated column
Repeat same YEAR = VAR mycount = CALCULATE ( COUNTROWS ( Donation_Level ), ALLEXCEPT ( Donation_Level, Donation_Level[ID], Donation_Level[Year] ) ) RETURN IF ( mycount > 1, "Y", "N" )
Zubair_Muhammad
Community Champion
8 years ago
Try this calculated column
Repeat same YEAR =
VAR mycount =
CALCULATE (
COUNTROWS ( Donation_Level ),
ALLEXCEPT ( Donation_Level, Donation_Level[ID], Donation_Level[Year] )
)
RETURN
IF ( mycount > 1, "Y", "N" )Zubair_Muhammad
Community Champion
8 years ago
And this one
Repeat Multiple Years =
VAR mycount =
CALCULATE (
DISTINCTCOUNT ( Donation_Level[Year] ),
ALLEXCEPT ( Donation_Level, Donation_Level[ID] )
)
RETURN
IF ( mycount > 1, "Y", "N" )- Zubair_Muhammad8 years ago
Community Champion
- kdsan8 years agoRegular VisitorPerfect! Thank you so much!