Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
113 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |