Forum Discussion
Customized bar graph
- Anonymous3 years ago
Hi Karthik12 ,
Please try below steps:
1. below is my test table
Table:
2. add a new column with below dax formula
Adjust Date = VAR cur_date = [Date] VAR _val = SWITCH ( TRUE (), cur_date >= DATEVALUE ( "2023/01/01" ) && cur_date <= DATEVALUE ( "2023/01/27" ), DATEVALUE ( "Jan 2023" ), cur_date >= DATEVALUE ( "2023/01/28" ) && cur_date <= DATEVALUE ( "2023/02/24" ), DATEVALUE ( "Feb 2023" ), cur_date >= DATEVALUE ( "2023/02/25" ) && cur_date <= DATEVALUE ( "2023/03/31" ), DATEVALUE ( "Mar 2023" ) ) RETURN _val3. add a bar chart with fields
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Karthik12 ,
In the case you should add a calculated column with an if and else statement specifiying that from this date to this date name it January else if its from this date to this date name it Feb and you continue, then you use this column when visualising.
If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos 👍
- Karthik123 years agoPost Patron
Hi,
Thanks for the hint.
Here am attaching my data model pbix file. Can you share the DAX codes ?
Jan 2023 - from 01-01-2023 to 27-01-2023
Feb 2023 - From 28-01-2023 to 24-02-2023
Mar 2023 - Fro m 25-02-2023 to 31-03-2023
Thanks in advance for your support !
Customized monthly bar graph.pbix