Forum Discussion

sanAccPowerbi's avatar
sanAccPowerbi
Copper Contributor
Mar 14, 2019

Need Help on Refresh function in .net for overrides the M expression in SSAS Tabular model.

Hi,

 

I need help on the below issue.

 

Function in .net for Overrides the M exrpression In partition of the Table .

 

public void Refresh(RefreshType type, ICollection<OverrideCollection> overrides);

 

public void RequestRefresh(RefreshType type, ICollection<OverrideCollection> overrides);

 

The above two functions are not working for override the old M expression for Paritition query  with New Expression.

 

We used the override class then we refresh with above functions unfortunately it is not updating the in the Expression. 

Code:

 

TOA.Partition partition = m.Tables.Find(Table).Partitions[1];

 

OverrideCollection oc = new OverrideCollection{

Partitions ={
new PartitionOverride{

OriginalObject =partition,
Source = new MPartitionSourceOverride
{Expression=expressions}}}};

var listOc = new List<OverrideCollection>();
listOc.Add(oc);

partition.RequestRefresh(TOA.RefreshType.Add ,listOc);

partition.Refresh(TOA.RefreshType.Add, listOc);

 

 

Thanks,

Santhosh.

No RepliesBe the first to reply

Resources