The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hii All,
I try to display the current month values(MAY) in days using a column chart.
In Dax, I return the output as a variable + 0. For example, _val + 0 will display the blank as 0. But it displays 0 for all the days, like below.
I need this blank as 0 until today. that doesn't display the days above today.
How do I fix this?
Anyone who knows, please tell.
Thanks in advance..!
Regards,
Valli Raja P.
You will need a calendar table and a relationship between your fact table date column and calendar date column. Pleaes search online if you don;t now how to create a simple calendar table.
In the calendar table you will need a Day Offset column. If you can't find a calendar table online with this, create a new Custom Column on the calendar table with the formula:
Hi @Vallirajap ,
I tested @Uzi2019 method and he worked for me.
This is my test data.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
Can you try this to enter similar values for April and February after you try this scenario?
because if I select the April month in the month slicer, it will also work the same way.
Thanks for the reply. If you have any further information, please share it with me.
Hi @Vallirajap ,
The current date is 2024/5/15, you mean the data after 5/15 will not be shown if it is 0, right? So do you want February data to be shown from 2/1 to 2/29 or just 2/1 to 2/15? Can you provide your example data and expected results, and if you can provide a pbix file (be careful to protect private data) that would be great.
Best Regards,
Neeko Tang
hi @Vallirajap
use this dax in calculated column not in measure
Today_= if(Max(Table[date])<=Today(),1,0)
use this as in visual filter
I hope i answered your question!
Hii @Uzi2019 ,
I also tried this one. but it can't change anything; it is still at the same stage.
Anyway, thanks for the reply. If you have any further information, please share it with me.
Hey,
use the filter function. Filters on this visual and seltect relative date and select is in this and month then hit apply filter. You'll get the answer.
Hi @Johnjose,
Your solution only displays the 5, 6, and 7 days, and when I select the previous month, it will not display anything.
Anyway, thanks for the reply. If you have any further information, please share it with me.