Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 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.
I have a data file that is made up of Awards that Customers give to us. Each award is made up of Customer, part number, start date of award, end date of award, qty, price, etc. Our sales team needs to sell the parts within the award period. We then need to compare what they sold against what was awarded.
Here are the characteristics of Awards:
Here’s what I’ve done so far:
What I need help with is this:
Solved! Go to Solution.
Hi @Roseventura ,
The method is similar.
First you need to convert your table to below format:(No merged cells inside)
Then go to query editor,select columns"Q1","Q2","Q3","Q4">choose"unpivot columns":
Then back to data view,create a calerdar table as suggested above,then create a new column as below:
Quarter = "Q"&QUARTER('Calerdar'[Date])
And a measure as below:
Measure 2 =
var _value=CALCULATE(MAX('Table (2)'[Value]),FILTER('Table (2)','Table (2)'[Attribute]=MAX('Calerdar'[Quarter])&&'Table (2)'[categoty]=MAX('Table (2)'[categoty])))
Return
IF(MAX('Calerdar'[Quarter]) in FILTERS('Table (2)'[Attribute]),_value/3,BLANK())
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Hi Kelly,
Your suggestion comes close, but it doesn't address the issue of when a customer has MORE THAN ONE award in a year. For instance, Customers can award us different quantities to sell over different time periods. They can even NOT award us anything for a time period. For example, the top table shows how several customers break down their awards. The second table shows how I need to break down each award over the Min/Max time period:
Your suggestion ignores any awards prior to the latest award.
Rose
Hi @Roseventura ,
The method is similar.
First you need to convert your table to below format:(No merged cells inside)
Then go to query editor,select columns"Q1","Q2","Q3","Q4">choose"unpivot columns":
Then back to data view,create a calerdar table as suggested above,then create a new column as below:
Quarter = "Q"&QUARTER('Calerdar'[Date])
And a measure as below:
Measure 2 =
var _value=CALCULATE(MAX('Table (2)'[Value]),FILTER('Table (2)','Table (2)'[Attribute]=MAX('Calerdar'[Quarter])&&'Table (2)'[categoty]=MAX('Table (2)'[categoty])))
Return
IF(MAX('Calerdar'[Quarter]) in FILTERS('Table (2)'[Attribute]),_value/3,BLANK())
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
The above solution did not work for me because it doesn't address when a specific customer has more than one award per year (if they give us an award every quarter that's 4 awards per year, so that's 4 start/end dates per year).
I managed to parse out my data file BEFORE it gets to Power BI so the data file arrives with everything broken down into monthly buckets.
I'll leave this marked as the solution because it may be helpful to someone else.
Here is an example of what I'm trying to achieve in spreadsheet form. The BLUE area is a sample row of data. The GREEN are measures I currently have. The ORANGE area is what I need help with:
I need to take what you have, but distribute it between months, not days. I know it's similar, but I'm having trouble applying my issue in the PBIX you sent me.
I don't know how to upload the PBIX to this message area.
Rose
Hi @Roseventura ,
First create a dimention table as below:
dim table = CALENDAR(MIN('Table'[Start date ]),MAX('Table'[end date]))
Then create a column as below:
Year-month = YEAR('dim table'[Date])&"-"&MONTH('dim table'[Date])
And a measure as below:
Measure = IF(MAX('Table'[Start date ])<=MAX('dim table'[Date])&&MAX('Table'[end date])>=MAX('dim table'[Date]),MAX('Table'[award qty by month]),BLANK())
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
@Roseventura ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Two way you can explore. One is file attached after signature or https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
82 | |
78 | |
52 | |
39 | |
35 |
User | Count |
---|---|
94 | |
79 | |
51 | |
47 | |
47 |