Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
navinkb9
Frequent Visitor

Calculate the Count between two end dates

I want to calcualate the ITEM_Count from the two end dates. i.e., When I am running report for 2022-2023 P06 highlighted below. then I want to see the Sum(ITEM_Count) between end dates of P04 and P05 Year Period. i.e., I want to see the sum as 60. And the same thing I would like to see for other periods as well respectively. 

Please Note- Year Period is not in Date Format and it is in Text Format

11.PNG

3 REPLIES 3
navinkb9
Frequent Visitor

I have provided the source file link and can you provide DAX how i can acheive the above desired results

navinkb9
Frequent Visitor

I am not able to upload the PBIX file. However, I have shared the sample Data and the screen from Power BI How I would like to see.

https://docs.google.com/spreadsheets/d/13AQamCMmYKa66xRxo9tdZjbovx9SVV-ZH1oIX9HW1y0/edit#gid=0 

 

From the below slicer. Whenever, I am selecting any Period from dropdown for instance when i am selecting 2021-2022 P06. Then, I want to see the Sum(Sales) of Previous Periond End Date between P05 & P04. I.e., (60+50) = 110. this is want I want the result. And the same thing should happen for any period I select from dropdown. Meaning I want to display these two previous sum in the card visual.  

1.PNG

v-yalanwu-msft
Community Support
Community Support

Hi, @navinkb9 ;

Sorry , I'm a little confused.
, 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. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors