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.
Hi guys, I need a help here, I have the following problem:
JAN 10
FEB 10
MAR 10
APR 10
MAY 10
JUN 10
JUL 10
AUG 10
I have a month slicer
When I select March
I'd like this result: 30
But When I select July, I'd like this result: 20
Anyone could help me please?
Solved! Go to Solution.
Hi @hettoritosi ,
Could you have a date column? If you have a date column, you could refer to below steps:
Create a calculated column:
Legend = IF([Date].[MonthNo]<6,1,2)
Create a measure:
Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),'Table1'[Date]<=SELECTEDVALUE(Table1[Date])&&'Table1'[Legend]=MAX('Table1'[Legend])))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi @hettoritosi ,
Could you have a date column? If you have a date column, you could refer to below steps:
Create a calculated column:
Legend = IF([Date].[MonthNo]<6,1,2)
Create a measure:
Measure = CALCULATE(SUM(Table1[Value]),FILTER(ALL(Table1),'Table1'[Date]<=SELECTEDVALUE(Table1[Date])&&'Table1'[Legend]=MAX('Table1'[Legend])))
Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Why is march 30 and july 20?
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCause the semester, i need to sum from Jan to Jun and Jul to Dec.
Then you will need to add data to your table that shows that Jan-Jun are in semester 1, and Jul-Dec are in Semester 2. In Power Query, just add a Semester column that says:
each if [Month] <= 6 then 1 else 2
Then any SUM() function in DAX on those values would split if you had the Semeseter column visible in the visual.
You need a date table to do this right.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCovering 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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
129 | |
106 | |
106 | |
86 | |
72 |