How can I compare 6 Months vs 6 Months dynamically in a Power BI bar chart

0 votes

How can I compare "6 Months vs 6 Months" dynamically in a Power BI bar chart?
How can I dynamically compare two six-month periods in a Power BI bar chart, using techniques like time intelligence or calculated columns for accurate performance comparisons?

2 days ago in Power BI by Evanjalin
• 32,290 points
20 views

1 answer to this question.

0 votes
  • Create a Date Table for time-based calculations.

  • Create DAX Measures:

    • Use DATESINPERIOD to calculate the sales for the Last 6 Months:

Last6Months = CALCULATE(SUM(Sales[Amount]), DATESINPERIOD(DateTable[Date], MAX(DateTable[Date]), -6, MONTH))

Use DATESINPERIOD for the Previous 6 Months:

Previous6Months = CALCULATE(SUM(Sales[Amount]), DATESINPERIOD(DateTable[Date], MAX(DateTable[Date]) - 180, -6, MONTH))

Create a Bar Chart, adding both measures to the Values and a time dimension (e.g., Month) to the Axis.

Format the chart to visually differentiate the two periods and add any slicers for dynamic filtering.

This will give you a dynamic comparison between the two 6-month periods.

answered 2 days ago by anonymous
• 32,290 points

Related Questions In Power BI

+1 vote
2 answers

How can I count the distinct values in a column using Power BI?

In Power BI, use the DISTINCTCOUNT DAX ...READ MORE

answered Nov 26, 2024 in Power BI by Anu
• 3,020 points
674 views
0 votes
2 answers

How can I hide the logo bar in Power BI reports or dashboards?

To hide the logo bar in Power ...READ MORE

answered Apr 3 in Power BI by anonymous
• 24,450 points
355 views
0 votes
2 answers
+1 vote
2 answers
0 votes
1 answer

Displaying Table Schema using Power BI with Azure IoT Hub

Answering your first question, Event Hubs are ...READ MORE

answered Aug 1, 2018 in IoT (Internet of Things) by nirvana
• 3,090 points
1,767 views
+1 vote
1 answer

Unable to install connector for Power Bi and PostgreSQL

I think the problem is not at ...READ MORE

answered Aug 22, 2018 in Power BI by nirvana
• 3,090 points
3,125 views
+2 votes
2 answers

Migrate power bi collection to power bi embedded

I agree with Kalgi, this method is ...READ MORE

answered Oct 11, 2018 in Power BI by Hannah
• 18,520 points
1,927 views
+1 vote
1 answer

Connect power bi desktop to dataset and create custom reports

Open power bi report nd sign in ...READ MORE

answered Oct 10, 2023 in Power BI by Monika kale

edited Mar 5 2,122 views
0 votes
1 answer

How can I create a dynamically changing infographic-like report in Power BI?

This would involve smart visual designs, interactivity ...READ MORE

answered Apr 8 in Power BI by anonymous
• 32,290 points
148 views
0 votes
1 answer

How can I call an API in Power BI when connected through a VPN?

Challenges When Calling an API via VPN Network ...READ MORE

answered Feb 27 in Power BI by anonymous
• 32,290 points
181 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP