March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi Team,
I'm new to POWER BI , i was trying to create sales analysis report where we are supposed to do comparison of sales of previous year month and this year month. in this community i found some solutions like using "CALCULATE(SUM([Discount]), PARALLELPERIOD(DateTime[Order Date],-1,year))" but later on i found this syntax does not work with M, power bi query leanguage.
1- wanted to know solution for that.
2- if that syntx does not work with M then what was the reason that such solution was shared in this community.
Solved! Go to Solution.
Hi @shashank,
In your sceanrio, please follow the steps in the screenshots of my first reply to create a measure using your formula, then you are able to drag this measure to visuals and check its value.
Besides, you can take a look at the following resources to learn more about using different languages (DAX, "M", SQL, MDX and R) in Power BI.
Learning resources
The Languages of Power BI
Introduction to Power Query (informally known as "M") Formula Language
Deep Dive into Power Query Formula Language
Thanks,
Lydia Zhang
Hi @shashank,
Where do you apply the above formula in Power BI Desktop? We need to create a measure using the above formula rather than writing it using M language, you can check the example in the following screenshot, for more details about measures in Power BI Desktop, please review this article: Tutorial: Create your own measures in Power BI Desktop.
Thanks,
Lydia Zhang
Hi Lydia,
Thanks for your suggestion, i was trying to use that method in creating "custom column" functionality avaialable in power query window.
from this discussion what i learned that M leanguage is supposed to be used with power query and DAX for creaing new dimentions. Can you advise me some good playlist of learning advance power BI.
Hi @shashank,
In your sceanrio, please follow the steps in the screenshots of my first reply to create a measure using your formula, then you are able to drag this measure to visuals and check its value.
Besides, you can take a look at the following resources to learn more about using different languages (DAX, "M", SQL, MDX and R) in Power BI.
Learning resources
The Languages of Power BI
Introduction to Power Query (informally known as "M") Formula Language
Deep Dive into Power Query Formula Language
Thanks,
Lydia Zhang
Hi where are the scressnshots. I am unable to see. Aldo can you post another URL beacuse that video which yu posted is not available. Thanks
Hi Lydia,
thanks a lot for all of your help , it would be really helpfull if you can share some url where demo of advance visualations is taught.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |