Forum Discussion
Anonymous
2 years agoNot applicable
SELECTECTVALUE not working fine.
This one have 3 cards with 3 different measures.
The first one is :
Qtd Total Current Month =
CALCULATE(
SUM(LinhasEncomendas_BI[partes]),
MONTH(LinhasEncomendas_BI[DataFinal]) =
IF(ISBLANK(SELECTEDVALUE(LinhasEncomendas_BI[DataFinal].[MonthNo])), MONTH(TODAY()),SELECTEDVALUE(LinhasEncomendas_BI[DataFinal].[MonthNo]))
)
The second one is:
The third one is:
The second one is:
Qtd Total Previous Month =
CALCULATE(
SUM(LinhasEncomendas_BI[partes]),
MONTH(LinhasEncomendas_BI[DataFinal]) =
IF(ISBLANK(SELECTEDVALUE(LinhasEncomendas_BI[DataFinal].[MonthNo])), MONTH(EDATE(TODAY(), -1)),MONTH(EDATE(SELECTEDVALUE(LinhasEncomendas_BI[DataFinal].[Date]), -1)))
)
The third one is:
Qtd Total Month Before =
CALCULATE(
SUM(LinhasEncomendas_BI[partes]),
MONTH(LinhasEncomendas_BI[DataFinal]) =
IF(ISBLANK(SELECTEDVALUE(LinhasEncomendas_BI[DataFinal].[MonthNo])), MONTH(EDATE(TODAY(), -2)),SELECTEDVALUE(LinhasEncomendas_BI[DataFinal].[MonthNo])-2)
)
The slicer contais LinhasEncomendas_BI[DataFinal] with year and month, when its nothing selected the 3 cards shows the actual month and the last 2 months, but when I select for example July they have to change to July - June - May. But itsn't working like I should. Can someone try to help me ?
The slicer contais LinhasEncomendas_BI[DataFinal] with year and month, when its nothing selected the 3 cards shows the actual month and the last 2 months, but when I select for example July they have to change to July - June - May. But itsn't working like I should. Can someone try to help me ?
- Anonymous2 years ago
Hi Anonymous
You can refer to the following measure
Qtd Total Current Month = CALCULATE ( SUM ( LinhasEncomendas_BI[partes] ), MONTH ( LinhasEncomendas_BI[DataFinal] ) = IF ( ISBLANK ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[MonthNo] ) ), MONTH ( TODAY () ), SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[MonthNo] ) ), ALL ( LinhasEncomendas_BI ) )Qtd Total Previous Month = CALCULATE ( SUM ( LinhasEncomendas_BI[partes] ), MONTH ( LinhasEncomendas_BI[DataFinal] ) = IF ( ISBLANK ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[MonthNo] ) ), MONTH ( EDATE ( TODAY (), -1 ) ), MONTH ( EDATE ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[Date] ), -1 ) ) ), ALL ( LinhasEncomendas_BI ) )Qtd Total Previous Month = CALCULATE ( SUM ( LinhasEncomendas_BI[partes] ), MONTH ( LinhasEncomendas_BI[DataFinal] ) = IF ( ISBLANK ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[MonthNo] ) ), MONTH ( EDATE ( TODAY (), -2 ) ), MONTH ( EDATE ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[Date] ), -2 ) ) ), ALL ( LinhasEncomendas_BI ) )Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- AnonymousNot applicable
Hi Anonymous
You can refer to the following measure
Qtd Total Current Month = CALCULATE ( SUM ( LinhasEncomendas_BI[partes] ), MONTH ( LinhasEncomendas_BI[DataFinal] ) = IF ( ISBLANK ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[MonthNo] ) ), MONTH ( TODAY () ), SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[MonthNo] ) ), ALL ( LinhasEncomendas_BI ) )Qtd Total Previous Month = CALCULATE ( SUM ( LinhasEncomendas_BI[partes] ), MONTH ( LinhasEncomendas_BI[DataFinal] ) = IF ( ISBLANK ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[MonthNo] ) ), MONTH ( EDATE ( TODAY (), -1 ) ), MONTH ( EDATE ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[Date] ), -1 ) ) ), ALL ( LinhasEncomendas_BI ) )Qtd Total Previous Month = CALCULATE ( SUM ( LinhasEncomendas_BI[partes] ), MONTH ( LinhasEncomendas_BI[DataFinal] ) = IF ( ISBLANK ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[MonthNo] ) ), MONTH ( EDATE ( TODAY (), -2 ) ), MONTH ( EDATE ( SELECTEDVALUE ( LinhasEncomendas_BI[DataFinal].[Date] ), -2 ) ) ), ALL ( LinhasEncomendas_BI ) )Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Thats works like I want too, thanks for the help 😄