Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi everyone 🙂
First steps with Power BI here.
I'm working on road accidents, trying to build a table to compare the number of accidents for every month of 2022 with the same month of 2021.
I work from a very simple table (Table_Accidents) that contains a line for every accident and elements on these accidents (date, place, type, etc.).
So I did the following :
I made a DAX formula to count the number of lines, which is my total number of accidents :
Nb_Accidents = COUNT(table_Accidents[#])
"#" being the name of the column where I just apply a different number to a new accident.
Then I wrote this formula :
Solved! Go to Solution.
Hi @CertainlyMe
SAMEPERIODLASTYEAR is a time intelligence function that requires a proper date table with unique and contiguous date values. Create a date table snd create a relationship between the date table snd your table then you can use 'Date'[Date] in SAMEPERIODLASTYEAR
Hi @CertainlyMe
SAMEPERIODLASTYEAR is a time intelligence function that requires a proper date table with unique and contiguous date values. Create a date table snd create a relationship between the date table snd your table then you can use 'Date'[Date] in SAMEPERIODLASTYEAR
User | Count |
---|---|
9 | |
8 | |
5 | |
4 | |
3 |