cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

blank values

i have a one table in that table there is date field and from that field i extract year and month and month name.. like month is 1,2 ,3 till 12 and month name like jan , feb, march .

so i calculate like this current month and last month sales but this shows blank

    current_month_sales = CALCULATE(SUM(Data[NetSales]),FILTER(Data,MONTH(Data[Month])=MONTH(TODAY())))

last_month_sales = var current_month= MONTH(TODAY()) return  CALCULATE(SUM(Data[NetSales]),FILTER(Data,MONTH(Data[Month])=current_month -1))
 
1 ACCEPTED SOLUTION
HoangHugo
Solution Specialist
Solution Specialist

You said, you already have Month column, so function MONTH(Data[Month] is not true. Try this one

current_month_sales = CALCULATE(SUM(Data[NetSales]),FILTER(Data,Data[Month]=MONTH(TODAY())))

same as last_month_sales

View solution in original post

1 REPLY 1
HoangHugo
Solution Specialist
Solution Specialist

You said, you already have Month column, so function MONTH(Data[Month] is not true. Try this one

current_month_sales = CALCULATE(SUM(Data[NetSales]),FILTER(Data,Data[Month]=MONTH(TODAY())))

same as last_month_sales

Helpful resources

Announcements
collabdays lisbon

CollabDays Lisbon - 26 November 2022

Sessions include practical, hands-on experience that will help you take the next step in your career and know-how.

Difinity Conference

Difinity Conference 2022

Difinity is the largest Microsoft Data, AI, Power BI, Power Platform and Business Applications Conference in New Zealand.

European Share Point Conference

European Share Point Conference

This conference returns live and in-person in Copenhagen this 28 November-01 December with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.