Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello Community,
Can someone please help me with this head knot ,
In a table , i have sales by day and by costumer and other dimensions
I have created a measure called
sales_last_day =
Quartiles | min value | max value | count of customers |
Q1 | 0 | (max value of Q1) | 1000 |
Q2 | (min value of Q2) | (max value of Q2) | 340 |
Solved! Go to Solution.
Hi @Moht,
You can try to use the following measure formula to get the lastdate sales based on current quarter group:
sales_last_day =
VAR maxday =
CALCULATE (
MAX ( table[date] ),
ALLSELECTED ( Table ),
VALUES ( Table[Quartiles] )
)
RETURN
CALCULATE (
SUM ( table[sales] ),
FILTER ( ALLSELECTED ( Table ), table[date] = maxday ),
VALUES ( Table[Quartiles] )
)
Regards,
Xiaoxin Sheng
Hi,
You are confusing Quartiles with Quarters. Anyways, try this. Create a Calendar Table with calculated column formulas for year, Month name, Month number and Quarters. Sort the Month name column by the Month number column. Create a relationship (Many to One and Single) from the Date column of the Data Table to the Date column of the Calendar Table. To your visual, Year and Quarter from the Calendar Table. Write these measures
Min = min(Data[Sales])
Max = max(Data[Sales])
Hope this helps.
Hi @Moht,
You can try to use the following measure formula to get the lastdate sales based on current quarter group:
sales_last_day =
VAR maxday =
CALCULATE (
MAX ( table[date] ),
ALLSELECTED ( Table ),
VALUES ( Table[Quartiles] )
)
RETURN
CALCULATE (
SUM ( table[sales] ),
FILTER ( ALLSELECTED ( Table ), table[date] = maxday ),
VALUES ( Table[Quartiles] )
)
Regards,
Xiaoxin Sheng
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
Check out the May 2024 Power BI update to learn about new features.
User | Count |
---|---|
91 | |
85 | |
65 | |
62 | |
58 |
User | Count |
---|---|
150 | |
113 | |
95 | |
80 | |
72 |