Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Dear helpers,
I have list of vending machines with exact sort of serial numbers with operating & closing dates , I need to check for example sales for 2023 came from how many vending machines like for example , total sales USD 1000 from 4 vending machines , below the database table
Serial # | Location Name | Operating Date | Closing Date | Status |
1 | System 1 | 01-01-23 | 30-12-23 | Active |
2 | System 2 | 01-01-23 | 30-12-23 | Active |
3 | System 3 | 01-01-23 | 30-12-23 | Active |
4 | System 4 | 01-01-23 | 30-12-23 | Active |
5 | System 5 | 01-01-23 | 30-12-23 | Active |
6 | System 6 | 01-01-23 | 30-12-23 | Active |
7 | System 7 | 01-01-23 | 30-12-23 | Active |
8 | System 8 | 01-01-23 | 30-12-23 | Active |
9 | System 9 | 01-01-23 | 30-12-23 | Active |
10 | System 10 | 01-01-23 | 30-12-23 | Active |
11 | System 11 | 01-01-23 | 30-12-23 | Active |
12 | System 12 | 01-01-23 | 30-12-23 | Active |
13 | System 13 | 28-04-22 | 30-05-23 | Inactive |
14 | System 14 | 27-04-22 | 30-05-23 | Inactive |
Thanks
Solved! Go to Solution.
hi, @hanyfouda2023
based on your data it work see below image
i am taking year of your operating date and compute measure
measure =
Measure = COUNT('Table'[serial])
calculated column
you can download .pbix file click HERE
Hi Danger323,
Thanks for your answer , when I apply it it gives same total number of Vending machines each year , for example
2022 4 VM
2023 4 VM
hi, @hanyfouda2023
based on your data it work see below image
i am taking year of your operating date and compute measure
measure =
Measure = COUNT('Table'[serial])
calculated column
you can download .pbix file click HERE
Dear Danger 332 ,
Thanks it works now when I used operating date
Hi, @hanyfouda2023
make a new column of year based on operating date or closing date
year = Year(tablename[closing date])
or
year = Year(tablename[operating date])
then make new measure like below
count of machine =
count(tablename[serial#])
drag your Year column and count of machine measure in table visual
you get your answer
User | Count |
---|---|
121 | |
72 | |
71 | |
57 | |
50 |
User | Count |
---|---|
167 | |
83 | |
68 | |
65 | |
55 |