cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
THENNA_41
Post Partisan
Post Partisan

How to split the charts based on Year and production center to get Deliver quantity count

I am trying to get Delivery quanioty count two split like year 2021 and 2022  & Production center UAO1 and UA01 

 

Production Center     Goods Issue Date          Delivertquantiy   

UA01                          06-01-2021                         1050 

RU02                          13-01-2021                         1050  

UA01                           20-01-2021                        1050

RU02                           06-02-2021                          111

UA01                           13-02-2021                           75

UA01                           20-02-2021                          430

UA01                            06-01-2022                         640

RU02                           13-01-2022                          640

UA01                            20-01-2022                         640

RU02                            06-02-2022                         130

RU02                            13-02-2021                         145

UA01                             20-02-2021                        245

 

I have added year slicer and Production center . i am trying to set two  x axis  one for year 2021 and   2022. also  for two axis in single  graph one for production center UA01 and another one RU02.  i created two measure  like below 

 

2021 dATE = CALCULATE(COUNT('Raw Data'[Delivery quantity]),DATESBETWEEN ('Raw Data'[Goods Issue Date],DATE(2021,01,01),DATE(2021,12,31)))

 

But when i creating 2022 measure i am getting  below Error 

 

<pi>A circular dependency was detected: Raw Data[2022 DATE], Raw Data[2021 dATE], Raw Data[2022 DATE].</pi>

 

2022 DATE = CALCULATE(COUNT('Raw Data'[Delivery quantity]),DATESBETWEEN ('Raw Data'[Goods Issue Date],DATE(2022,01,01),DATE(2022,12,31)))
 
Looking for support. thanks in advance.
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@THENNA_41 , Do not use time intelligence function on table, prefer date table try like

 

CALCULATE(COUNT('Raw Data'[Delivery quantity]),Filter( 'Raw Data', 'Raw Data'[Goods Issue Date] >= DATE(2022,01,01) && 'Raw Data'[Goods Issue Date] <= DATE(2022,12,31)))

 

or all

 

CALCULATE(COUNT('Raw Data'[Delivery quantity]),Filter(all( 'Raw Data') , 'Raw Data'[Goods Issue Date] >= DATE(2022,01,01) && 'Raw Data'[Goods Issue Date] <= DATE(2022,12,31)))

View solution in original post

3 REPLIES 3
THENNA_41
Post Partisan
Post Partisan

@amitchandak  thank you sir 

v-rongtiep-msft
Community Support
Community Support

Hi @THENNA_41 ,

Does the answer to @amitchandak 's give you a solution? If so, please mark his answer as the solution. If not, please provide your pbix file without privacy information and more details with your desired output. (Or some sample data in a pbix file and desired output.)

 

How to Get Your Question Answered Quickly 

 

Best Regards
Community Support Team _ Polly

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@THENNA_41 , Do not use time intelligence function on table, prefer date table try like

 

CALCULATE(COUNT('Raw Data'[Delivery quantity]),Filter( 'Raw Data', 'Raw Data'[Goods Issue Date] >= DATE(2022,01,01) && 'Raw Data'[Goods Issue Date] <= DATE(2022,12,31)))

 

or all

 

CALCULATE(COUNT('Raw Data'[Delivery quantity]),Filter(all( 'Raw Data') , 'Raw Data'[Goods Issue Date] >= DATE(2022,01,01) && 'Raw Data'[Goods Issue Date] <= DATE(2022,12,31)))

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors