Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
In my data there is Service column, EPK(Earning Per Km), date_key column in the format of (20230728. 2023-year, 07-month, 28-date) & data type of the column is whole number. Count of distinct date_key column is nothing but service operated days(SOD). I created a scatter plot with Avg EPK on X-axis, Count of distinct date_key(service operated days) & service in values. The scatter plot is of 16 grids(4*4=16) with 25th,50th,75th & 100th percentile llines for X-axis(avg EPK) & Y-axis(count of distinct date_key(SOD))
Now I wanted to create to slicers
1. Avg EPK
2. Count of distinct date_key (service operated days)
Based on these two filters I want to filter/see services in the scatter plot.
But I am not able to create slicer for Count of distinct date_key column is nothing but service operated days(SOD). It is coming as 1. But it should be in range from 1 to 91(since the data is for june,july& august months only). If I select a range a range of 1 to 70 the services run from 1 to 70 days(distinct date_key count) should come. But I am facing error
Someone Pls help me with this
SAMPLE FILE
PBIX FILE
https://drive.google.com/file/d/1ydyOHZvhEhqP8Xqnh5c5GV7EgRwAmzWe/view?usp=sharing
Solved! Go to Solution.
Hi @Chandramouli_BI ,
We can create a table.
Slicer = GENERATESERIES(1,DISTINCTCOUNT('agg_route'[date_key]),1)
Then we can create a measure.
count = MAX('Slicer'[Value])
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Chandramouli_BI ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create calculated columns.
Count of distinct date_key = CALCULATE(COUNT('Table'[date_key]),FILTER('Table','Table'[date_key]=EARLIER('Table'[date_key])))
Average EPK = AVERAGEX(FILTER('Table','Table'[date_key]=EARLIER('Table'[date_key])),[EPK])
(3) Then the result is as follows.
If the above one can't help you get the desired result, 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. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks @v-tangjie-msft for the reply. Below are the sample files
SAMPLE FILE
PBIX FILE
https://drive.google.com/file/d/1ydyOHZvhEhqP8Xqnh5c5GV7EgRwAmzWe/view?usp=sharing
Hi @Chandramouli_BI ,
We can create a table.
Slicer = GENERATESERIES(1,DISTINCTCOUNT('agg_route'[date_key]),1)
Then we can create a measure.
count = MAX('Slicer'[Value])
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
143 | |
104 | |
103 | |
82 | |
70 |