Forum Discussion
nvmtrang
3 years agoFrequent Visitor
Power BI and Data warehouse
Hi, we have some back dated transactions where business users modify sale amounts. In power bi, they want to see latest records when they select current month. But the tricky thing is when they selec...
- 3 years ago
can anyone help? really appreaciate your help on this 😁
- 3 years ago
Hi, nvmtrang
You can try the following methods.
Sample data:
Measure = VAR _Sum = CALCULATE ( SUM ( 'Table'[Sales Amount] ), FILTER ( ALL ( 'Table' ), [Etl Month] = SELECTEDVALUE ( Slicer[Slicer Month] ) && [Sales Month] = SELECTEDVALUE ( 'Table'[Sales Month] ) ) ) VAR _N1 = IF ( _Sum = BLANK (), MIN ( 'Table'[Sales Amount] ), _Sum ) RETURN IF ( SELECTEDVALUE ( 'Table'[Sales Month] ) <= SELECTEDVALUE ( Slicer[Slicer Month] ), _N1, BLANK () )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.
v-zhangti
Community Support
3 years agoHi, nvmtrang
You can try the following methods.
Sample data:
Measure =
VAR _Sum =
CALCULATE ( SUM ( 'Table'[Sales Amount] ),
FILTER ( ALL ( 'Table' ),
[Etl Month] = SELECTEDVALUE ( Slicer[Slicer Month] )
&& [Sales Month] = SELECTEDVALUE ( 'Table'[Sales Month] ) ) )
VAR _N1 =
IF ( _Sum = BLANK (), MIN ( 'Table'[Sales Amount] ), _Sum )
RETURN
IF ( SELECTEDVALUE ( 'Table'[Sales Month] ) <= SELECTEDVALUE ( Slicer[Slicer Month] ),
_N1,
BLANK ()
)
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.