Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
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
I am getting the result but only till the 2022/12 after that the value is showing for the next month is blank I need the value 15736 to display over there. Can you please help ?
Solved! Go to Solution.
Hi, @SupriyaVarun
You can try the following methods.
Column:
Fiscal Month2 = LEFT([Fiscal Month],4)*100+RIGHT([Fiscal Month],2)
Measure:
Pre month SO =
Var _Prevmonth=MAXX(FILTER(ALL('Table'),[Fiscal Month2]<SELECTEDVALUE('Table'[Fiscal Month2])),[Fiscal Month2])
Return
CALCULATE([No of distinct Sales order],FILTER(ALL('Table'),[Fiscal Month2]=_Prevmonth))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sua tabela de data (dCalendar) precisa deste campo:
"Ano Mes Num", YEAR ( [Date] ) * 12 + MONTH ( [Date] ) - 1
Em seguida, fazer esta medida:
Total =
CALCULATE (
[Qtde],
WINDOW (
-1,
REL,
-1,
REL,
ALLSELECTED ( dCalendar[MesAno], dCalendar[Ano Mes Num] )
)
Resultado:
Thank you 🙂
Hi,
Create a Calendar Table with calculated column formulas of FY, Month name and Month number. Sort the Month name by the Month number. Create a relationship (Many to One and Single) from the Date column of your Data Table to the Date column of the Calendar Table. To your visual, drag FY and Month name from the Calendar Table. Write this measure
Measure = calculate([your measure],previousmonth(Calendar[date]))
Hope this helps.
Hi @SupriyaVarun, if you can provide a santized dataset similar to your actual data, it will easy to create a solution and share it with you. You can either give your sample data as an Excel file or PBIX. (Just in case it is okay with you. Else please ignore).
@SupriyaVarun
You can try converting fiscal month by changing it to date format or create date column as below. Then use previous month function.
Let me know if this helps!
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate your kudos!!
Thanks for your help 🙂
But I have used the above measure, it did not work as I needed the values were showing incorrect as per calendar table.
I need the measure using Fiscal month not the calendar month
Use the below logic, Basically when month is 1, it bexomes zero due to -1 and not 12. Also try it with and without the highlighted part(This is to pull out 2022 instead of 2023). Depending on your calendar table sturcture either year - 1 or just year will work.
Prev_ =
VAR CM =
VALUE ( RIGHT ( MAX ( 'SM Dim Calendar'[Fiscal Month] ), 2 ) )
VAR jan =
CALCULATE (
SUM ( SOW[No of disctinct SO#] ),
VALUE ( RIGHT ( 'SM Dim Calendar'[Fiscal Month], 2 ) )
= VALUE (
RIGHT ( FORMAT ( MAX ( 'SM Dim Calendar'[Fiscal Month] ), "YYYY/MM" ), 2 )
) + 11,
'SM Dim Calendar'[Fiscal Year]
= FORMAT ( MAX ( 'SM Dim Calendar'[Date] ), "YYYY" ) - 1
)
VAR Others =
CALCULATE (
SUM ( SOW[No of disctinct SO#] ),
VALUE ( RIGHT ( 'SM Dim Calendar'[Fiscal Month], 2 ) )
= VALUE (
RIGHT ( FORMAT ( MAX ( 'SM Dim Calendar'[Fiscal Month] ), "YYYY/MM" ), 2 )
) - 1,
'SM Dim Calendar'[Fiscal Year]
= FORMAT ( MAX ( 'SM Dim Calendar'[Date] ), "YYYY" )
)
VAR FInal =
IF ( CM = 1, jan, Others )
RETURN
FInal
Let me know if this helps!
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate your kudos!!
The columns i have used Fiscal Month from calendar table,
No of distinct Sales order = DISTINCTCOUNT('SM Fact [Sales Order Number])
Now I need Previous fiscal month sales order only the 2023/01 value is showing blank.
Hi, @SupriyaVarun
You can try the following methods.
Column:
Fiscal Month2 = LEFT([Fiscal Month],4)*100+RIGHT([Fiscal Month],2)
Measure:
Pre month SO =
Var _Prevmonth=MAXX(FILTER(ALL('Table'),[Fiscal Month2]<SELECTEDVALUE('Table'[Fiscal Month2])),[Fiscal Month2])
Return
CALCULATE([No of distinct Sales order],FILTER(ALL('Table'),[Fiscal Month2]=_Prevmonth))
Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @SupriyaVarun
Can you try to add Allselected(table,table[fiscal month]) in you filters, If this doesn't make a change please share a sample data with all the columns used in the table visual.
Let me know if this helped.
If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate your kudos!!
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.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 39 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |