Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mikel1380
Frequent Visitor

create a Flag for the same store, if the m2 are equals

Hi Friends,  i need your help. I have tried to create a flag for a same store based on the m2 of each contract.

 

my datamy dataDT.JPGi Try to do thisi Try to do this

Greetings

3 REPLIES 3
parry2k
Super User
Super User

Create two measure, one for this sales for this year and another for sales for previous year, you can DATEYTD and SAMEPERIODLASTYEAR function to calculate these measure.

 

Add another measure to see the difference between the values of above two measures.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Thanks, but i cant get it

 

 

resultado.JPG

Anonymous
Not applicable

@mikel1380,

Create the following measures in your table

m2-2016 = CALCULATE(SUM(Table1[M2]),Table1[Year]=2016)
m2-2017 = CALCULATE(SUM(Table1[M2]),Table1[Year]=2017)
flag = IF([m2-2016]=[m2-2017],1,0)
1.JPG


If the above DAX don’t help, please post the dummy data of your table in Excel and share us the Excel file, and describe what is the current issue.

Regards,
Lydia

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors