Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
HI,
i have this problem, i got the sales on Jan2018 and a comparative one (May 2018), how can i get just the sales that are in the first group period but no in the second and sales that are lower in the second period compared to the first.
Thanks.
Solved! Go to Solution.
This is really better done in Power Query, but you specified DAX. The DAX calculated column would be:
Column =
IF(
ISBLANK('Sales Data'[May 2018]),
'Sales Data'[Jan 2018],
IF('Sales Data'[May 2018] < 'Sales Data'[Jan 2018],
'Sales Data'[Jan 2018],
BLANK()
)
)Then add a Grid visual, add the "Items" (A, B, C...) field and the new "Columns" (Call it whatever you want) column and it will automatically show your results. It will not show rows where "Columns" is blank.
If you'd rather see this in Power Query, ping back. PQ is better at data modeling than DAX is. In this limited case, the logic will be similar, and the data set is small, but if this were a few thousand records, DAX starts to get large and potentially slower with lots of data in calculated columns.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThis is really better done in Power Query, but you specified DAX. The DAX calculated column would be:
Column =
IF(
ISBLANK('Sales Data'[May 2018]),
'Sales Data'[Jan 2018],
IF('Sales Data'[May 2018] < 'Sales Data'[Jan 2018],
'Sales Data'[Jan 2018],
BLANK()
)
)Then add a Grid visual, add the "Items" (A, B, C...) field and the new "Columns" (Call it whatever you want) column and it will automatically show your results. It will not show rows where "Columns" is blank.
If you'd rather see this in Power Query, ping back. PQ is better at data modeling than DAX is. In this limited case, the logic will be similar, and the data set is small, but if this were a few thousand records, DAX starts to get large and potentially slower with lots of data in calculated columns.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThanks
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.