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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello All I am new on power BI, Please help to check if there is any solution for the questions I have;
I want to get the current sales and target sales from the one date field.
I tried to use card viz in power bi to only show the current month like January , but the actual sales column shows 0, and target values show 410. any help will be appreciated. thanks
date | actual sales | target sales |
1/3/2019 | 100 | 200 |
1/4/2019 | 110 | 210 |
1/5/2019 | 120 | 220 |
1/6/2019 | 130 | 230 |
1/7/2019 | 140 | 240 |
1/8/2019 | 150 | 250 |
1/9/2019 | 160 | 260 |
1/10/2019 | 170 | 270 |
1/11/2019 | 180 | 280 |
1/12/2019 | 190 | 290 |
1/1/2020 | 200 | 300 |
1/2/2020 | 0 | 310 |
1/3/2020 | 0 | 320 |
1/4/2020 | 0 | 330 |
1/5/2020 | 0 | 340 |
1/6/2020 | 0 | 350 |
1/7/2020 | 0 | 360 |
1/8/2020 | 0 | 370 |
1/9/2020 | 0 | 380 |
1/10/2020 | 0 | 390 |
1/11/2020 | 0 | 400 |
1/12/2020 | 0 | 410 |
Solved! Go to Solution.
@Anonymous
I have two solutions for you, not sure wihch one matches your demand:
1. Create a date slicer.
2. If you want to show the values in a card. Use this measure to show the current month actual and target value, So now is Jannuary the result is 200 & 300.
CurrentmonthAcutual&Target =
var currentmonthActual = CALCULATE(MAX([actual sales]), FILTER(Sheet3,[date].[Year]=YEAR(TODAY())),FILTER(Sheet3,Sheet3[date].[MonthNo]=MONTH(TODAY())))
var currentmonthTarget = CALCULATE(MAX([target sales]),FILTER(Sheet3,[date].[Year]=YEAR(TODAY())),FILTER(Sheet3,Sheet3[date].[MonthNo]=MONTH(TODAY())))
Return CONCATENATE(currentmonthActual,CONCATENATE("&",currentmonthTarget))
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
I have two solutions for you, not sure wihch one matches your demand:
1. Create a date slicer.
2. If you want to show the values in a card. Use this measure to show the current month actual and target value, So now is Jannuary the result is 200 & 300.
CurrentmonthAcutual&Target =
var currentmonthActual = CALCULATE(MAX([actual sales]), FILTER(Sheet3,[date].[Year]=YEAR(TODAY())),FILTER(Sheet3,Sheet3[date].[MonthNo]=MONTH(TODAY())))
var currentmonthTarget = CALCULATE(MAX([target sales]),FILTER(Sheet3,[date].[Year]=YEAR(TODAY())),FILTER(Sheet3,Sheet3[date].[MonthNo]=MONTH(TODAY())))
Return CONCATENATE(currentmonthActual,CONCATENATE("&",currentmonthTarget))
Paul Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you
@Anonymous
What is the expected output? I see the sum(sales) for Jan is 0. How are you displaying the targer sales measure? Are there any DAX such as closingbalancemonth?
Please post additional info to better answer your question.
Sorry I should mention that the date format is DD/MM/YYYY.
The acutal sales value for Jan is 200, the target is 300.