Forum Discussion
Creating a flag
- 6 years ago
Hi, Anonymous
You may create a calculated table and a measure as below.
Calculated table:
Calendar = CALENDARAUTO()Measure:
Result = Var _month = SELECTEDVALUE('Calendar'[Date].[MonthNo]) Var _year = SELECTEDVALUE('Calendar'[Date].[Ano]) Return IF( COUNTROWS( FILTER( ALL('relatorio_cartoes (74) - Copia'), YEAR('relatorio_cartoes (74) - Copia'[Order])=_year&& MONTH('relatorio_cartoes (74) - Copia'[Order])=_month&& 'relatorio_cartoes (74) - Copia'[User]=SELECTEDVALUE('relatorio_cartoes (74) - Copia'[User]) ) )>0, "Y","N" )Then you may use the 'Date' column from 'Calendar' to filter the result.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler i did something like this
And that works kinda fine, but need something else to be perfect.
since i selected August 2020, and this Client A have a order(order is the credit thing, this table will always show if someone have credit) on this date(see the last line), everything on the past must be "Y" too, the N will be only if the Customerdidnt appear on the selected month(i have another table "Customer" where everyone appears,example, for this Client A if there is no order, the last line should be that 23/07/2020 and "N" all the way up).
Thanks
Anonymous - This is really confusing to follow. Sample data, expected output, how is your visual configured? You say you are choosing August 2020, is this in a slicer? And your measure returns correctly but not for historical items. How are the historical items being displayed if you have filtered to August 2020? I'm confused. Can you share a PBIX. Can you share sample data (as text) that demonstrates the issue? Walk us through it because I'm not following what is happening on your end at all.