Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi All
I have below expression working fine :-
Solved! Go to Solution.
Hi @admin11
YTD Less one Month column is a Flag, please try to build it in your Date table.
In your sample , you build it in another table instead of Date table, so you will get the wrong result.
You table should look like as below. YTD Less one Month column in Jan and Feb in 2021 will return 1 and Mar will return 0.
Result is as below.
By default:
Select 1, it will show Jan and Feb in 2021.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @admin11
I think you want to show values less one month due to report delay.
Try to build a calculated column for filter
YTD Less one Month =
IF (
YEAR ( 'Table'[Date] ) = YEAR ( MAX ( 'Table'[Date] ) )
&& MONTH ( 'Table'[Date] )
<= MONTH ( MAX ( 'Table'[Date] ) ) - 1,
1,
0
)
Then you can use [YTD Less one Month] = 1 in filter to filter the YTD expression less one month.
If this reply still couldn't help you solve your problem, please show me a sample by your Onedrive for Business.
And you can show me a screenshot of the result you want to me.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous
I have try , i get Jan till DEc 2021. what i expect is getting only Jan till Feb 2021 not include March 2021.
Hi @admin11
YTD Less one Month column is a Flag, please try to build it in your Date table.
In your sample , you build it in another table instead of Date table, so you will get the wrong result.
You table should look like as below. YTD Less one Month column in Jan and Feb in 2021 will return 1 and Mar will return 0.
Result is as below.
By default:
Select 1, it will show Jan and Feb in 2021.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@admin11 ,
Try like
YTD QTY forced=
var _max = eomonth(today(),-1)
return
if(max('Date'[Date])<=_max, calculate(Sum('order'[Qty]),DATESYTD('Date'[Date])), blank())
//or
//calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),filter('Date','Date'[Date]<=_max))
//calculate(TOTALYTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]<=_max))
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 47 | |
| 44 | |
| 20 | |
| 20 |
| User | Count |
|---|---|
| 73 | |
| 72 | |
| 34 | |
| 33 | |
| 31 |