Forum Discussion
Karthik12
3 years agoPost Patron
Customized bar graph
Hello Team, I have production date till today which have date and production qty. I would like plot a month wise bar graph (Month vs production qty) for this year (Jan and Feb 2023). But, I would...
- 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.
Anonymous
3 years agoNot applicable
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
_val
3. 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.