Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

QA Visual to Card - Calculation Without Measure Creation. How to reproduce ?

Hello all, 

 

I hope you're all doing well. 

 

I'm working mainly on Power BI Report Server (Desktop Optimised for Report Server) but was trying the new features of Power BI Desktop (Service) on the same machine.

 

Working with these two versions, I've been facing an interesting challenge regarding the QA Visual (which is not enabled in Power BI Desktop Report Server but is in Desktop)

 

In my report I have two measures [MeasureX] and [MeasureY]. They are used with two Calculation Groups but this is not direcly the subject here.

 

I've created a very simple QA Visual with the following statement

 

 

MeasureX divided by MeasureY

 

 

 

RomainDomart_0-1605200599252.png

 

The output is the following  at the visual Level: (Very important that no new measure is created ! and that both measures are evaluated in the visual separately) 

Then I've transformed the QA Visual to a Card Visual with the available option on the right side.

RomainDomart_1-1605200662276.png

Analysing this visual, it gives me the following : 

You can ignore the two filters..

 

 

 

// DAX Query
DEFINE
  VAR __DS0FilterTable = 
    TREATAS({"Sales Amount"}, 'Metric'[Metric])

  VAR __DS0FilterTable2 = 
    TREATAS({"Sales Quantity"}, 'Metric copy'[Metric copy])

EVALUATE
  SUMMARIZECOLUMNS(
    __DS0FilterTable,
    __DS0FilterTable2,
    "M0", IGNORE(DIVIDE('Sales'[MeasureX], 'Sales'[MeasureY]))
  )

 

 

 

As you can see the Two Measures are directly evaluated and Divided inside the Visual ! This is what I want. 

 

  • To get the same visual I've created the following Measure

 

 

Ratio =  DIVIDE('Sales'[MeasureX], 'Sales'[MeasureY])

 

 

And added a card visual with the [Ratio] Measure. 

The evaluation gives me : 

You can ignore the two filters..

 

 

 

 

// DAX Query
DEFINE
  VAR __DS0FilterTable = 
    TREATAS({"Sales Amount"}, 'Metric'[Metric])

  VAR __DS0FilterTable2 = 
    TREATAS({"Sales Quantity"}, 'Metric copy'[Metric copy])

EVALUATE
  SUMMARIZECOLUMNS(
    __DS0FilterTable,
    __DS0FilterTable2,
    "Ratio", IGNORE('Sales'[Ratio])  )

 

 

 

You see the difference :

  1. the Two Measures are evaluated,
  2. the Measure Ratio is evaluated (seems logic isn't it.. )

 

 

But for me , I need to be able to use the first scenario i.e. being able to evaluate in my visual the Divide(MeasureX ,MeasureY) and not Ratio. 

The main goal is to use alongside Calculation Groups. In the first scenario, I've two measures that I can replace with Calculation Item (and selectively by using SelectedMeasure) , in the second one, I've just have one...

 

Is there any way to directly edit the code of a Visual? To recreate this scenario 1 without QA Visual (which is not available in my production environment (PBRS.. ) ) 

Here is the File https://drive.google.com/file/d/1LycHdfnMOvVIi6P3MyasYIyIK5xvP2An/view?usp=sharing

 

Thank you all

Romain

 

2 REPLIES 2
v-deddai1-msft
Community Support
Community Support

Hi @Anonymous ,

 

Please report this as an Issue using issues.powerbi.com.  first check to see if it has already been reported.  

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

Anonymous
Not applicable

I'll add more informations on this subject  and also add the PbiX File. 
I have two calculation Group on top of that. 
1.First One [A] Change the Measure when the measure is MeasureX to the selection
2. Second One [B] change the Measure when the measure is Measure Y to the selection. 

With these two Calculation Group, I can therefore change X to whatever I want with [A] and Y to whatever I want with [B]. That is the goal. 

With the QA Visual, I can use the Calculation Groups as it changes MeasureX to [A] and MeasureY to [B].

But When I create the [Ratio] Measure, there is not X and Y involved directly in the visual (just [Ratio]) therefore [A] and [B] do not have any impact. 



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.